This didnt work as well. SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') as formatted_ts FROM custlogon;
It caused my script to die and not execute at all.... ----- Original Message ----- From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Dan J. Rychlik" <[EMAIL PROTECTED]>; "Chris W. Parker" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 23, 2003 7:15 PM Subject: RE: [PHP] SQL statement > > Ive used this > > $query = ("SELECT username, password, DATE_FORMAT(timestamp, > > '%d%m%y') FROM > > custlogon"); > > > > But I recieve unknown index timestamp. *shrug* > > > > > You are receiving the error on an array returned by fetch_array? If so, it > is because the index is "DATE_FORMAT(timestamp, '%d%m%y')", not timestamp, > which isn't so great. You can see this by doing a print_r on the array to > see what is actually in it. Use aliasing in your query to give it a better > index. > "SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') as formatted_ts > FROM custlogon" or something like that. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php