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

$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.

116 Like 52 Dislike
Previous php-forum Next php-forum
Other php-forum

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

A Few Questions
Hi, I want to ask a few questions that I can't seem to find..

1) I'm creating a "shortcu

Can't find the problem (no error message)!
OK, here's the deal. This code is really weirdly formatted (sorry!) and hard to understand, so I'm g

error reporting
hey everyone

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

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th

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