PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
DATE_FORMAT

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
chifliiiii



Joined: 02 May 2008
Posts: 3

PostPosted: Fri May 02, 2008 3:49 pm    Post subject: DATE_FORMAT Reply with quote

Im using pear as is the only method i learnt with php to connect to databases( im new to php , sql etc). The problem is that i need the date in format dd mm yy but sql stores it in yyyy mm dd format. I know there is a way to format with with normal sql sintaxis using DATE_FORMAT function. Buy im trying it with pear without success. There is any other way to do this? Thanks in advance.

The query im trying to do is
$lista=$db->getAll("SELECT tr.id_tra, tr.descripcion, tr.status, DATE_FORMAT(tr.fechaentrada,'%d/%m/%y'), tr.id_cli, tr.tipotrabajo, cl.id_cli, cl.nombre_cli FROM trabajos as tr , clientes as cl WHERE tr.id_cli = cl.id_cli");
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software