Re: Question about passing date in sql...

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

 



Payne wrote:
Guys,

Got a quick question. I got a sql statement works when I pass it from the cli. but if I try in php I get nothing.

This is the statement.

Select ip, date, time, CONCAT(city, ', ',country) as location from ips where country !=' ' and date='`date +%Y%m%d`' order by country asc;

I know it has to do with date='`date +%Y%m%d`', because if I remove it works.

Any clue as to why?

Payne

why not use the PHP function to format the date?

http://www.php.net/date
-B

--
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