| View previous topic :: View next topic |
| Author |
Message |
chifliiiii
Joined: 02 May 2008 Posts: 3
|
Posted: Fri May 02, 2008 3:49 pm Post subject: DATE_FORMAT |
|
|
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 |
|
 |
|
|
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
|
|