February 11th, 2000, 09:43 PM
I want to know the row number in a mysql
i found mysql_num_rows($result);
this is the total number of rows,
but now i want to know from the number of the selected row.
i used to work with clipper5.0 ,
there it was recno(), but what's the function
in mysql ??
thanks for reply,
February 11th, 2000, 11:16 PM
There are no record numbers when using a relational db unless you put them there yourself as one of the fields. mysql has an auto_increment keyword that can be used when creating a table that will, you guessed it, auto_increment an integer data type and assign the next integer to a record when it is inserted.
February 12th, 2000, 07:21 PM
okay, i understand that, but can somebody
tell me how to find out the row number
of an array ??
i get the result, but after it i want
to know on which row i am while doing
a do..while.. loop.
February 12th, 2000, 09:56 PM
If that's important you should probably use a for loop.
February 13th, 2000, 12:49 AM
even if i do a for loop,
i still want to know the array number
which is being handles
February 13th, 2000, 02:11 AM
You would use the index of the for loop to index your array.