Page 2 of 2

Posted: Sun Feb 02, 2003 9:19 pm
by puckeye
Actually WHERE 1 returns everything in the table.

It's like using if (1) {} in PHP, this if would always execute it's internal block because 1 is always TRUE.

Posted: Mon Feb 03, 2003 2:46 am
by twigletmac
and instead of using MYSQL_ASSOC like this:

Code: Select all

while ($row = mysql_fetch_array($res,MYSQL_ASSOC)) {
you can use mysql_fetch_assoc() like so:

Code: Select all

while ($row = mysql_fetch_assoc($res)) {
Mac

Oh and I really can't help myself, just have to say - FrontPage, urgh.