PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a DB with a log file of all connections entering my website. From testing on this I have ran 'php <file>' from a console which has caused blank entries in the table and then genuine data has been added and I've now deleted these blank lines which has left a bad increment of the IDs eg - 1, 2, 3, 5, 6, 7.
What function is there in PHP to edit data on a certain row in the database and not where certain data is equal to something on any row. I want to go though:
A) Update row 1 ID with <variable>
B) Update row 2 ID with <variable + 1>
etc etc
I can do the looping I just don't know how to select certain rows.
Can someone point me in the right direction please.
You don't. Either use specifics for that row or store the results that would select all of the records you want to iterate over into an array before processing.