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

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

pass form variables straight to email, no database required?
hello all,

im working on this form...

http://www.adobedayevents.com/project_request/pr

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

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

Simple MySQL script is not working
Hey guys,

Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly

Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

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