View Full Version : Null querys?
If i run a query, to select all the forums that a user moderates, how can i check to see if the result is nothing?
if ($access=="") { echo "no access"; die; }
??
Would that work?
How would i do it if not?
make it more OO please like this
if ($access=="") {
echo "no access";
die;
}
Admin
04-06-2002, 07:14 AM
No, that won't work.
$access = $DB_site->query_first("Your query here");
if (!$access) {
echo 'No access';
exit;
}
Queries never return an empty string.
Originally posted by neo
make it more OO please like this
if ($access=="") {
echo "no access";
die;
}
Like that matters :) - I normally do use the layed out format, but when typing i dont bother formatting my code.
FireFly : Thanks :)
well if you can read it, but for other coders its better that way
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.