I have a short code to get the results of a db_query into an array:
$r = db_query('SELECT vid FROM {node_revisions} WHERE nid = %d', $node->nid);
while ($vids[] = db_result($r));
The only problem is, that I get an empty array value:
Array(
[] => 105
[] => 409
[] =>
)
How can I prevent the empty array value?
I found the shortest code to get all results from db_query in an array:
The resulted array looks now like this: