Ben schrieb:
In the URL, use the DB table's row id instead of the display table's row
number to identify the row being edited.
HTH
Jo
I wonder if anyone can help... I have a database containing a number of tables. These tables can be sorted,displayed, and edited as desired by the user via php form. If the table is sorted by id, then if the user clicks the edit button for the third record down on his table then I know which record he wants to edit - id number 3. But if the table is sorted by something else it gets trickier - he clicked on row number three, but that may not be the recod with id=3 if it is sorted by something ...
I wonder if anyone can help...
I have a database containing a number of tables. These tables can be
sorted,displayed, and edited as desired by the user via php form.
If the table is sorted by id, then if the user clicks the edit button
for the third record down on his table then I know which record he
wants to edit - id number 3. But if the table is sorted by something
else it gets trickier - he clicked on row number three, but that may
not be the recod with id=3 if it is sorted by something else. Is
there a way to have some sort of numeric reference field that is not
affected by the sorting, so that it 1 will always refer to the top
returned record, 2 the second etc...?
I hope the above makes some sense...
Cheers,
Ben
Ben schrieb:
In the URL, use the DB table's row id instead of the display table's row
number to identify the row being edited.
HTH
Jo
On 7 Apr, 10:18, Joachim Durchholz <org> wrote:
>
> In the URL, use the DB table's row id instead of the display table's row
> number to identify the row being edited.
>
> HTH
> Jo[/ref]
Hi Jo - thanks for that. That would make more sense - at the moment I
just use an incrementing counter. I'll see if I can change it -thanks.
Ben
On 7 Apr, 10:20, "Ben" <com> wrote:
> [/ref]
>
>
>
> Hi Jo - thanks for that. That would make more sense - at the moment I
> just use an incrementing counter. I'll see if I can change it -thanks.
>
> Ben[/ref]
Yep -that worked. Thanks a lot!
On 7 Apr 2007 02:10:16 -0700, Ben wrote:
You put the id for the record into the link when you're generating the
form.
--
16 megs in a '95 box! Yo Ho Ho and a battle of RAM!
Bookmarks