PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Jim_Bo
Forum Contributor
Posts: 390 Joined: Sat Oct 02, 2004 3:04 pm
Post
by Jim_Bo » Mon Aug 22, 2005 7:56 pm
Hi,
Can the following code be set outside of an sql query .. mainly so I dont have to list all the fields within SELECT and use * instead:
Code: Select all
DATE_FORMAT(ADDDATE(last_login, INTERVAL 16 HOUR), '%d-%b-%Y %r') AS last_login
Cheers
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Aug 22, 2005 8:00 pm
or just do....
Code: Select all
SELECT *, DATE_FORMAT(ADDDATE(last_login, INTERVAL 16 HOUR), '%d-%b-%Y %r') AS last_login FROM table...
Jim_Bo
Forum Contributor
Posts: 390 Joined: Sat Oct 02, 2004 3:04 pm
Post
by Jim_Bo » Mon Aug 22, 2005 8:35 pm
Hi,
Oh that crossed my mind but assumed it wouldnt work ..
Cheers