RE: [PHP] SQL Question
| From: | Rick Emery | Date: | Thu, 28 Mar 2002 14:46:13 +0000 |
| Subject: | RE: [PHP] SQL Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90529@lists.php.net to get a copy of this message | ||
> How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
> example say I wanted to list all my users alphabetically. How would I do
> this?
You would sort in your SQL statement, not PHP.
SELECT * FROM my table ORDER BY field_name;
> Or say I had a form and I wanted to present the content to the user
> *AFTER* they have filled it out so that they can check for mistakes.
> Mysql_fetch_row() returns all the rows in a field
Why would the data be in the mysql database? You would simply pass the
field values to the next page, where the user would verify/validate the
data. Then, you'd write to the database.
-----Original Message-----
From: Sebastian A. [mailto:sebi@xinium.com]
Sent: Thursday, March 28, 2002 8:35 AM
To: PHP General List (PHP.NET)
Subject: [PHP] SQL Question
How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
example say I wanted to list all my users alphabetically. How would I do
this? Or say I had a form and I wanted to present the content to the user
*AFTER* they have filled it out so that they can check for mistakes.
Mysql_fetch_row() returns all the rows in a field, so I would guess that I
have to sort using PHP. Can anyone provide me with an idea as to how I could
accomplish this?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php