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

2006-09-23 Thread Matthias Willerich
Hello,
  $q = sprintf(SELECT id FROM content);
This has nothing to do with your problem, but why don't you just do the
following?
$q = 'SELECT id FROM content'; 

But here's your problem. Change
  $realones = $row['id'];
into
$realones[] = $row['id'];
And you get your desired result.

Matthias

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2006-09-23 Thread Dave W

Yea, thanks. I forgot to hit reply to all. I usually use sprintf for mysql
injection stuff. I use that function from php.net for
mysql_real_escape_string.

On 9/23/06, Matthias Willerich [EMAIL PROTECTED] wrote:


Hello,
  $q = sprintf(SELECT id FROM content);
This has nothing to do with your problem, but why don't you just do the
following?
$q = 'SELECT id FROM content';

But here's your problem. Change
  $realones = $row['id'];
into
$realones[] = $row['id'];
And you get your desired result.

Matthias






--
Dave W