Quote:
Originally Posted by Seductor
I am doing something wrong. I have this:
resource(46) of type (mysql result)
|
You are registering the return from one of the query functions. You need to call fetch_array() to get an array for each row, like:
Code:
$results = $db->query_read("some sql");
while ($row = $db->fetch_array($results))
{
// do something with $row
}
Of course each row is an array (even if you only selected one column). If you are selecting one column from a number of matching rows, you won't get an array with all the matching values, you still get an array for each row. If you want an array with all the matching values you'd have to build that yourself.
Note also that you don't *have* to register an array to your template and use vb:each - you could format your own html string in the while loop above, then just register the string.