|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
I want to know the row number in a mysql
database, 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, Jan. |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
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. thanks ! Jan. |
|
#4
|
|||
|
|||
|
If that's important you should probably use a for loop.
|
|
#5
|
|||
|
|||
|
even if i do a for loop,
i still want to know the array number which is being handles ![]() thanks ! jan. |
|
#6
|
|||
|
|||
|
????
You would use the index of the for loop to index your array. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > row number in mysql database ? ( newbie ;) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|