$result=mysql_query("SELECT distinct(order_id),name,status,total FROM ".$tcname."_h2o LIMIT $limit1, $limit2");
The distinct keyword applies to the whole row. Since you're including other fields that will be different even though the name is the same, MySQL does not consider them duplicate rows.
-- Stuart
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php