Re: Question about passing date in sql...
| From: | Brad Bonkoski | Date: | Wed, 01 Aug 2007 21:49:38 +0000 |
| Subject: | Re: Question about passing date in sql... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260032@lists.php.net to get a copy of this message | ||
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='http://www.php.net/date -Bdate +%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?