Currently, I have coded this (in PHP).
<? $array = array("0");
$q1 =mysql_query("SELECT id FROM `stuff` ORDER BY `id` ASC");
while($q=mysql_fetch_object($q1)){
$array[] = $q->id;
} ?>
It doesn't take that long to load, but I was wondering, if there was a more efficient way than this? If there is, please share. It just doesn't feel efficient if there are 1000 rows.
If there isn't, please say so.