[thelist] mySQL- how to test if table contains data

BT Bigpant bigpant at btinternet.com
Wed Feb 6 09:36:00 CST 2002


could be, I know FROM_UNIXTIME(unix_timestamp, format) works.
Try the format as "%Y-%m-%d". That should give 2002-02-06 for today. As long
as you use Ymd, you will get the year, month and day, ignoring hours, mins &
secs.

HTH
Phil Parker

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Ben Phillips
Sent: 06 February 2002 14:13
To: thelist at lists.evolt.org
Subject: RE: [thelist] mySQL- how to test if table contains data


> Would it be possible to "GROUP BY " day, when the date-format is in
> Unix-time (sec since 1970) ?

you can do this:

select ... ,TO_DAYS(timestamp) as date_day where ... group by date_day

i think? i know that works with a mysql timestamp - don't know if it works
with a unix timestamp... can anyone clarify?

benji.
inchima.com

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list