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

2002-03-14 Thread Chris Hewitt
Rick, I agree. Row ids should be for internal database use. SQL frees us from needing them. 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 the order in whi

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

[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"]; >

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

2002-03-13 Thread Tyler Longren
t: Wednesday, March 13, 2002 9:57 PM Subject: [PHP] Re: Get row number from mysql > 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

[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. $n