Variable content
Posted: Thu Dec 23, 2004 8:33 am
Is there an easy way to check whether a variable contains a mysql recordset/dataset?
Thanks
Thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
That'll only tell you if it contains *something*, not if it contains a mysql resource handle. Mysql_num_rows() might work.. it'd tell you if its a resultset by returning the number of rows.snicolas wrote:if(!$variable){
echo "nothing";
}else{
echo "something";
}
s