Re: Question about passing date in sql...
| From: | Richard Lynch | Date: | Wed, 08 Aug 2007 03:12:57 +0000 |
| Subject: | Re: Question about passing date in sql... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260400@lists.php.net to get a copy of this message | ||
On Wed, August 1, 2007 5:00 pm, Michael Preslar wrote:
>> I know it has to do with date='
date +%Y%m%d',
>> because if I remove
>> it
>> works.
>
> Are you trying to use perl's back tic operator in php here?
Close.
He's trying to use the shell's back tick operator in MySQL.
I think.
It would actually work if the date +%Y%m%d was outside of the quotes
he is wrapping around his query, as then he'd be using PHP's backticks
operator which is very much like a shell backticks operator.
Though using PHP date() function, as already suggested, would be MUCH
faster.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?