RE: [PHP] Re: Get row number from mysql

2002-03-14 Thread Rick Emery
The greater question: Why does irow order matter? What are you REALLY trying to do? == In article 000701c1cb06$3b54f3b0$0101a8c0@nightengale, [EMAIL PROTECTED] says... Hello, How can I get the number of the current row, something like this: ? $sql = mysql_query(SELECT *

Re: [PHP] Re: Get row number from mysql

2002-03-14 Thread Chris Hewitt
Rick, I agree. opinionRow ids should be for internal database use. SQL frees us from needing them. /opinion Tyler, what order do you want these records returned in? That is what goes into the ORDER BY clause. If, for example, it is alphabetical order of NAME then use ORDER BY NAME. If it is

[PHP] Re: Get row number from mysql

2002-03-13 Thread michael kimsal
Tyler Longren wrote: Hello, How can I get the number of the current row, something like this: ? $sql = mysql_query(SELECT * FROM table ORDER BY id DESC); while ($row = mysql_fetch_array($sql)) { $id = $row[id]; $name = $row[name]; print $current_row_number. $nameBr; } ?

Re: [PHP] Re: Get row number from mysql

2002-03-13 Thread Tyler Longren
hmmm, I never thought of that. Thanks for the help. ;-) Tyler - Original Message - From: michael kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Tyler Longren [EMAIL PROTECTED] Cc: PHP-General [EMAIL PROTECTED] Sent: Wednesday, March 13, 2002 9:57 PM Subject: [PHP] Re: Get row number

[PHP] Re: Get row number from mysql

2002-03-13 Thread David Robley
In article 000701c1cb06$3b54f3b0$0101a8c0@nightengale, [EMAIL PROTECTED] says... Hello, How can I get the number of the current row, something like this: ? $sql = mysql_query(SELECT * FROM table ORDER BY id DESC); while ($row = mysql_fetch_array($sql)) { $id = $row[id]; $name