Hello, I need some help here please. i have form inserting rows to database. this forms contains table based on cloning row.. so basically when i add new row it will add the values to database but when i retrieve data it will populate the rows to table then i will be able to add new row of data and update the exisiting data simultaneously. im using loop on my script.. so when the loop finds a row that exist, it will just update the content of that row and if not found it will add the new item to database. Im not sure how to implement this using loop, can you give me an enlightenment? an example perhaps. Thank you
Well, if you have an existing row in the dataset, that row should have a unique ID from the database - which you will use to update said row. If it's new data, there will be no unique ID, and you'll just insert a new row. Just check for said ID (posted for instance via a hidden form-field, defaulting to something like "new_row_<insert counter>" if no ID is found)