Page 1 of 1

QUERY :

Posted: Thu Jun 16, 2011 12:55 pm
by at_rcc
$num_stud = nuRunQuery("SELECT count(customer_id)FROM tbl_batch_stud WHERE customer_id='$cust_id' and batch_id= '$my_batch'");

Hi the variable $num_stud is not storing the value integer it should get?
any idea ?

Re: QUERY :

Posted: Fri Jun 17, 2011 12:03 am
by admin
nuRunQuery wont directly give you count(customer_id).

Code: Select all

$t                 = nuRunQuery("SELECT count(customer_id) FROM tbl_batch_stud WHERE customer_id='$cust_id' and batch_id= '$my_batch'");
$r                 = db_fetch_row($t);
$num_stud          = $r[0];
Steven

Re: QUERY :

Posted: Fri Jun 17, 2011 6:13 am
by at_rcc
THANK YOU VERY MUCH mr Steven , you are really a Geek