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

All possible combinations of String in PL/SQL
Hi All,

Could you please explain the logic of getting all possible combinations of String

Creating a db with a query
Hello everyone.
I'm having troubles creating a db with a query.
I'm reading a book called PHP

Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tie

Executing an exe
Hi. I have some bizarre problem with exec (other any other method) to launch exe's. I am making a ga

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

How to assign a textbox value to PHP variable??
Hi ! Can any one help me out as quickly as possible. As I m new to PHP.
Plz tell me how to assign

Problem with Sending Mail by PHP
hello all,
I m new to php, can u plz provide me the code to send mail by php having CAPTC

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

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