SV: [PHP-DB] sorting the data
| From: | Fredrik Larsson | Date: | Mon, 16 Oct 2000 18:39:37 +0000 |
| Subject: | SV: [PHP-DB] sorting the data | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3655@lists.php.net to get a copy of this message | ||
Sort it in the SQL using "order by <columnname>" after the where statement.
-----Ursprungligt meddelande-----
Fran: bryan [mailto:bryan@concept-factory.com]
Skickat: den 16 oktober 2000 20:25
Till: php-db@lists.php.net
Amne: [PHP-DB] sorting the data
If I am trying to sort the data from my "mysql_db", how would i implement
that code? Here is what I have and the errors that follow
while($row = mysql_fetch_array($result)) {
echo "Data" . $row[0] . " ";
echo "data2" . $row.... ;
sort($row);
}
When I do this, I get an error stating that I am passing an invalid data
type.
Warning: Wrong datatype in sort() call
Should I use asort();? or, am I not calling the array right?
Thanks
bryan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net