Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

QUERY :

Post Reply
at_rcc
Posts: 32
Joined: Thu Sep 02, 2010 11:19 am

QUERY :

Unread post 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 ?
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: QUERY :

Unread post 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
at_rcc
Posts: 32
Joined: Thu Sep 02, 2010 11:19 am

Re: QUERY :

Unread post by at_rcc »

THANK YOU VERY MUCH mr Steven , you are really a Geek
Post Reply