Re: If statement duplicating mysql records?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/20/07, Jason Pruim <japruim@xxxxxxxxxx> wrote:
Hey Jim,

You're right it is the system you helped me get started with, Just
wanted to add a little color coding for the different levels :)

Here is the sql query:

$sql  = "SELECT * FROM tasks WHERE completed='0' order by id";
$sql .= " AND (day_of_week BETWEEN '0' AND '".$dow."')";

   Sure, give Jim the credit.  Now you're uninvited from the wedding!  ;-P

   Try rewriting your SQL query:
       $sql  = "SELECT * FROM tasks WHERE completed='0'";
       $sql .= " AND (day_of_week BETWEEN '0' AND '".$dow."')";
       $sql .= " ORDER BY id";

   Looks like you even kept the variables and statements pretty much
the same.  Glad to see it's working out for you out-of-the-box, for
the most part.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux