Re: posting field_DATE variables

From: Date: Wed, 22 Jan 2003 17:16:53 +0000
Subject: Re: posting field_DATE variables
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-25042@lists.php.net to get a copy of this message
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

« previous php.db (#25042) next »