Unable to retreve the values from Mysql Query


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resulting 5 which is correct but when i try to get tht in php its not printing the value

Did you know?Explore Trending and Topic pages for more stories like this.
$sql_query= "Select Count(*) from (Select Cat_Num from cat_completiondate where `EmployeeNumber`=$employeenumber and `CategoryJobPosition` =$jobid) as temp";
$query_result2=mysql_query($sql_query);
$result_row2=mysql_fetch_array($query_result2);
$value=$result_row2['temp'];
echo($value)


Output:- It doesnot print anything.
No comments posted yet

Your Answer:

Login to answer
116 Like 52 Dislike
Previous forums Next forums
Other forums

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

Linking with Foreign Keys
I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name v

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

Anti Spam Code Problems
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.

I have a CMS and on the

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

Pagination won't carry results past page 2.
Hi all,

I've worked out my pagination script and its paginating fine until I click next from

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash