Just something random I picked up:
Quote:
Originally posted by Martz
PHP Code:
$result=$DB_site->query_first("SELECT title FROM forum WHERE forumid=6");
As there will only be 1 forum at the most in the database with a forumdid of 6 - we can use query_first. $result is returned as a normal variable, unlike the standard query function which returns an array. This can be used just as:
PHP Code:
echo "The forum title is $result";
|
Should say:
$result is returned as a normal array
and the PHP code needs to echo $result[title].
Also when you use query(), you are not getting an array, but a result set (of MySQL). When you use query_first() you get an array.
Great thread.