The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PULLIN MY HAIR OUT! stumped on $db->query_first
I have a query which works fine returning all my data using following method:
PHP Code:
PHP Code:
|
#2
|
|||
|
|||
Try...
Code:
$db->query_read($sql); |
#3
|
||||
|
||||
$db->query_read() returns the MySQL result.
$db->query_first() returns the fetched array (and frees the MySQL result). This only works for single rows. |
#4
|
||||
|
||||
Thanks for the assistance Calorie & SirAdrian, the following works for me
I'm still getting used to vb's objects, taking me some time but persistance is my best learning aid... and the vborg community :banana: Code:
$qryartists = $db->query_read(" SELECT erc_artist.*, erc_artisttype.artisttype, MIN(erc_artistimage.artistimageid) AS artistimageid FROM erc_artist LEFT JOIN erc_artisttype ON erc_artist.artisttypeid = erc_artisttype.artisttypeid LEFT JOIN erc_artistimage ON erc_artist.artistid = erc_artistimage.artistid WHERE artistisactive = '1' GROUP BY erc_artisttype.displayorder, artisttitle "); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|