Quote:
Originally Posted by Nullifi3d
When I use query_read it only prints out the last link that would show (because read is not an array function).
|
To print all when using query_read(), change the eval statement to:
PHP Code:
eval('$premium_links .= "' . fetch_template('directory_premium_links')
Quote:
Originally Posted by Nullifi3d
Why doesn't it work with first?
|
Because you don't need the while-statement or the fetch_array() if you're using query_first. query_first will already restrieve the row (query_first never return more then 1 row). With query_first you would need just (asuming your query would never return more then 1 row:
PHP Code:
$link = $db->query_first("SELECT pl_href AS href, pl_title AS title, pl_anchor AS anchor FROM " . TABLE_PREFIX . "user WHERE pl_href != ''");
eval('$premium_links = "' . fetch_template('directory_premium_links') . '";');
Quote:
Originally Posted by tnguy3n
$links = $db->query
|
'query' is depreciated in vB3.5, use query_read or query_write instead.