Forum Moderators: open
For example:
SELECT address FROM database WHERE name='daniel'
Name is a unique field so it'll only return 1 match. Once it finds the row where name=daniel I want to be able to tell what row number in the DB that is. How can I do this?
And then afterwards, how can I select data from a specific row (like if I wanted to select the address for the next row)?
Thanks!
there is really no concept of a "row number" in a relational db, except in the results set of a given select.
there might be a unique index that autoincrements.
you can add that to your select statement...
SELECT unique_id, address FROM database WHERE name='daniel'
And then afterwards, how can I select data from a specific row (like if I wanted to select the address for the next row)?