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 havent looked at the doc for it, but the first thing that sorta pops into my mind would maybe be to use backticks rather than single quotes (replace ' with `). Cant hurt to try
no error came up. however what im wondering is that usually when i have 10 entries and i delete one of them i just do an auto increment reset to 1 and it automatically puts it to the next highest number (10 being the next to be uses after deleting). maybe when doing it through php code i have to reset it to the exact number needed
yes.. did a test to set it to something way over the last one like 200 and it did a reset to 200 so it worked in this case. so it means i need to check the database after the delete is done to find out the last entry and add one and set the autoincrement to whatever that is
had to use
I thought you were emptying out a table, and wanted to reset the auto increment counter in which that case it would let you reset it to 1.I believe that it will reset the counter to the next highest available number.
using phpmyadmin setting it to 1 will cause it to go to the last available incremental number. but when trying to do it via php code it didnt work. so i had to do it this way. however im getting a problem now when trying to place this in a function.