RE: [PHP] SQL statement
| From: | Jennifer Goodie | Date: | Wed, 24 Sep 2003 00:29:17 +0000 |
| Subject: | RE: [PHP] SQL statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163665@lists.php.net to get a copy of this message | ||
> try this:
>
> $query = "SELECT username, password,
> DATE_FORMAT(CURRENT_TIMESTAMP(), '%d%m%y') FROM custlogon";
>
> or if that doesnt work try:
>
> $query = "SELECT username, password, DATE_FORMAT(NOW(), '%d%m%y')
> FROM custlogon";
[snip]
original query as posted:
SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon
[/snip]
Unless timestamp is actually the name of a column in the database, in that
case NOW() and CURRENT_TIMESTAMP() won't give the expected results.