Re: Yes, a newbie and a date question

From: Date: Fri, 16 May 2003 19:28:41 +0000
Subject: Re: Yes, a newbie and a date question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147968@lists.php.net to get a copy of this message
On Saturday 17 May 2003 02:58, Shrader, Patrick wrote: > Jason Wrote: > If you want to use your existing code then change your SELECT > statement to use > UNIX_TIMESTAMP() on your date field. > > How can I use the "SELECT * from xyz" statement and still use the > UNIX_TIMESTAMP() command? Will I have to describe each field separately? If you only want to change your SELECT statement then you need to select each field explicitly: SELECT UNIX_TIMESTAMP(name_of_date_field) as name_of_date_field, field_a, field_b FROM ... Otherwise use: SELECT *, UNIX_TIMESTAMP(name_of_date_field) as new_name_of_date_field FROM ... Then further on: $shipdate = $row_hdr["new_name_of_date_field"]; -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* An aphorism is never exactly true; it is either a half-truth or one-and-a-half truths. -- Karl Kraus */

« previous php.general (#147968) next »