Re: [PHP-DB] sorting problem...

2003-03-13 Thread Ignatius Reilly
Take a look at the MySQL DATE_FORMAT() function.

Ignatius

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 2:43 PM
Subject: [PHP-DB] sorting problem...


 Hi All,
 
 I need to sort some data from a MySQL table. I have data saved like this:
 
 ++-++--+
 | id | unixtime| porta_snmp | porta_switch |
 ++-++--+
 |  1 | 2003-01-07 12:23:24 | 1614   | 1|
 |  2 | 2003-01-07 12:24:01 | 1614   | 1|
 |  3 | 2003-01-07 12:29:34 | 1614   | 1|
 |  4 | 2003-01-07 12:30:19 | 1614   | 1|
 |  5 | 2003-01-07 12:31:01 | 1614   | 5|
 |  6 | 2003-01-07 12:32:06 | 1614   | 5|
 |  7 | 2003-01-07 12:33:01 | 1614   | 1|
 |  8 | 2003-02-07 12:34:06 | 1614   | 1|
 |  9 | 2003-02-07 12:35:00 | 1614   | 1|
 | 10 | 2003-02-07 12:36:01 | 1614   | 1|
 ++-++--+
 
 I neet to sort the data to be able to read it better. In this case I just
 need to filter the data to get only the different info for each day. Some
 thing like this:
 
 2003-01-0716141
 2003-01-0716145
 2003-02-0716141
 
 Is this possible ?
 
 Thank's in advance,
 Gus
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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



RE: [PHP-DB] sorting problem...

2003-03-13 Thread Snijders, Mark
guess you can better take a look at the group by function of mysql



-Original Message-
From: Ignatius Reilly [mailto:[EMAIL PROTECTED]
Sent: donderdag 13 maart 2003 15:03
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] sorting problem...


Take a look at the MySQL DATE_FORMAT() function.

Ignatius

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 2:43 PM
Subject: [PHP-DB] sorting problem...


 Hi All,
 
 I need to sort some data from a MySQL table. I have data saved like this:
 
 ++-++--+
 | id | unixtime| porta_snmp | porta_switch |
 ++-++--+
 |  1 | 2003-01-07 12:23:24 | 1614   | 1|
 |  2 | 2003-01-07 12:24:01 | 1614   | 1|
 |  3 | 2003-01-07 12:29:34 | 1614   | 1|
 |  4 | 2003-01-07 12:30:19 | 1614   | 1|
 |  5 | 2003-01-07 12:31:01 | 1614   | 5|
 |  6 | 2003-01-07 12:32:06 | 1614   | 5|
 |  7 | 2003-01-07 12:33:01 | 1614   | 1|
 |  8 | 2003-02-07 12:34:06 | 1614   | 1|
 |  9 | 2003-02-07 12:35:00 | 1614   | 1|
 | 10 | 2003-02-07 12:36:01 | 1614   | 1|
 ++-++--+
 
 I neet to sort the data to be able to read it better. In this case I just
 need to filter the data to get only the different info for each day. Some
 thing like this:
 
 2003-01-0716141
 2003-01-0716145
 2003-02-0716141
 
 Is this possible ?
 
 Thank's in advance,
 Gus
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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



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