Hi,
I have 2 tables in a DB. The one contains data with values, like copy, images etc and the other contains IDs that relates to an ID var in the 1st table.
So when I load a page, the 2nd table gets read (it will have about 10 IDs, which all calls rows from the 1st table) and then the content gets populated relating to the first table... mmm OK, I know it sounds confusing, but that's just for background.
No my problem is:
I add a new row in the 1st table (data table). So I need to know what the autoIncremented ID of this JUST ADDED row is, so I can update it in the Second table (dataList table)
So far I have something like this:
1. Add entry (data Table)
2. Query (data Table) - determine how many entries (since this should be the very last one - auto incr)
3. determine the ID of the last entry...Now this is where I'm stuck, since this wouldn't be the same as the number of entries (since you can delete also)
Any help or direction will be much appreciated
Thanks in advance