Re: [PHP-DB] posting field_DATE variables

2003-01-22 Thread Jason Wong
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 *


/*
To err is humor.
*/


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




Re: [PHP-DB] posting field_DATE variables

2003-01-22 Thread Fabrizio Tivano
On Thu, 23 Jan 2003 00:27:26 +0800
Jason Wong [EMAIL PROTECTED] 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