At the moment i have a code that looks like-
$query='select id from users where username="'.$sessuser.'"';
$q->query($query);
$q->next_record();
$userid=$q->f("id");
$query='select COUNT(*) as numar from pending where (userid='.$userid.')and( frome like "%'.$searchemail.'%")';
$q->query($query);
$q->next_record();
$numar=$q->f("numar");
I do not wish to use the $query anymore and would the above to work like-
$sql = select id from users where username="'.$sessuser.'"';
So i need to change all the $q & $query
But i'm not sure how to change it all. Any help please ?
Thanks
Chris.