query not working properly

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

 



Hi everyone,
I'mt trying to do the below query which itself works correctly, but when I
add a order by statement just bombs.

       $query = "select * from articles where ( {$now} BETWEEN startdate
AND enddate) and categoryid = 1 limit 0,3";



        $query = "select * from articles order by startdate asc where (
{$now} BETWEEN startdate AND enddate) and categoryid = 1 limit 0,3";

This one just doesn't work, can you tell me what I have done wrong??



Thanks

[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