PDA

View Full Version : How do I now what is the row number?


webandwe
04-26-2007, 11:06 AM
Hi

I am using PHPmyAdmin

If I create a table and the rows x,y,z.. How do I know what row number x,y and z is?

I have a update script but it work with the rows? So I need to know the rows numbers.

Thanks

devinemke
04-26-2007, 05:44 PM
use an auto incrementing integer type as the table's primary key field

Fumigator
04-26-2007, 05:49 PM
You need a unique key for your table so you can refer to any given row using that key. You can use a single "ID" column that auto-increments, or you can use data already in your table (an email address, for example). I lean toward numeric ID because using data that means something (i.e. email) gets messy when the email address changes and then you have to change all the foreign keys in other tables and it's a real headache.