Re: posting field_DATE variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Jan 2003 00:27:26 +0800
Jason Wong <php-db@gremlins.biz> wrote:

> On Wednesday 22 January 2003 23:53, Fabrizio Tivano wrote:
> > I have a  php-application witch use mysql DB;
> >
> > My db have a field (DATE) like timestamp(8)  = 20030110,
> > for lay-out problem i call field_DATE
> > with a query :
> >  date_format(field_DATE, '%d-%m-%Y'),
> >
> > and it display the field_DATA;
> > 10-01-2003
> >
> > well.....at this point i need to post this field_DATA on another php script
> > witch let me to make another SELECT on same DB;
> >  but now the $field_DATA variable is like 10-01-2003.
> >
> > How i can post $field_DATA variable such as 20030110 again? (the original
> > DB_field).
> 
> There are many ways to do this. One is:
> 
>   $date = explode('-', '10-01-2003');
>   $newdate = $date[2] . $date[0] . $date[1];
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> 

YEP! 
that's work fine! 

thanx a lot!
fabrizio

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux