Dan J. Rychlik <mailto:[EMAIL PROTECTED]>
on Tuesday, September 23, 2003 4:58 PM said:
> I know its failing because php doesnt like the quotation before the
> format parameters. Ive tried to fix this without any luck. Any
> Ideas ?
It's failing because the ' before the %d is closing the string.
Here's how I work out SQL stuffs:
$sql = "SELECT username\n"
." , password\n"
." , DATE_FORMAT(timestamp, '%d%m%y')\n"
."FROM custlogon";
$query = ($sql);
Althought it looks like it takes a lot more time to write (which is
true) it looks great when you are debugging.
echo "<pre>$sql</pre>";
Alternatively you should be able to do this:
$query = ("SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y')
FROM custlogon");
chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php