Mysql rows help
Moderator: General Moderators
Mysql rows help
Any one know how to set for example :"ID" row with autoincrement to inniatlly begin counting from row 1 instead of 0?? Example problem will be a table with two columns, "memberid" and "membername". "Memberid" is set as primary, not null, and autoincrement. lets just ignore "membername" for now. Now say went enter in 5 members using a php script or somthing. Now usin phpadminstration we can see that there are 5 input rows. "memberid" can be seen counting from 1 up to 5 however the rows are counted from 0-4 hence still 5 rows. This causes me confusion and problems, there are ways to go around this problem, but it will cause confusion etc. Cause if we use a script to show membername number 5 than we have to open row 4. if any one can help please respond. Thankyou.
AUTO_INCREMENT is indeed starting at 1. It is just that PHP arrays start at 0, so $row[0] = MEMBERID 1.
What confusion is it causing? I would think as long as you always pull up records by MEMBERID, you should not have a problem. The array element number should be irrelevant (and varying, unless you retrieve every records from the table every time).
What confusion is it causing? I would think as long as you always pull up records by MEMBERID, you should not have a problem. The array element number should be irrelevant (and varying, unless you retrieve every records from the table every time).