Re: [PHP-DB] Turning result into array from columns

2006-09-22 Thread Stephen Brooks
$realones = $row['id']; This line needs to be $realones[] = $row['id']; ...then you will be filling an array instead of just overwriting the same variable repeatedly! -Stephen - Original Message - From: "Dave W" <[EMAIL PROTECTED]> To: "PHP DB" Sent: Friday, September 22,

[PHP-DB] Turning result into array from columns

2006-09-22 Thread Dave W
So I'm trying to pull id's and put them into an array. I know I need to iterate through them, but it doesn't seem to turn into an array. Here's the function that I'm trying: function checkID($id) { $q = sprintf("SELECT id FROM content"); $result = $this->query($q); while ($row = mysql_fetch_arra