Use
$DB_site->query() when retrieving more than 1 row from your database. This returns a MySQL resouce ID, that can be used in
mysql_fetch_array() within a while loop to iterate through rows.
e.g.
PHP Code:
$result = $DB_site->query("
SELECT displaytext
FROM " . TABLE_PREFIX . "secondarytitle
WHERE category = $post[sectitletype]
AND $post[posts] >= minposts
AND $post[posts] <= maxposts
");
while ($secondtitle = $DB_site->fetch_array($result))
{
echo $secondtitle['displaytext'];
}
$DB_site->query_first() is for retrieving just one query, and will return an array you can use.
e.g.
PHP Code:
$secondtitle = $DB_site->query_first("
SELECT displaytext
FROM " . TABLE_PREFIX . "secondarytitle
WHERE category = $post[sectitletype]
AND $post[posts] >= minposts
AND $post[posts] <= maxposts
");
echo $secondtitle['displaytext'];