I am creating a movie database with php and want my id to automatic count as I enter records? How can I do this?
Set the id field to AUTO_INCREMENT
Another useful date attribute: on update CURRENT_TIMESTAMP
One more thing. how do I get to show in a input or text box with the right id showing?
One more thing. how do I get to show in a input or text box with the right id showing?
Can you give an example or link to a page that is not showing "the right id
It is show with the right $id. Just not where I want to go in the input box as the others are displayed. It shows a 0 in the box instead of the id.
Here is a pic, this is prototype of the form. The id will only show the 0 and not the record# . There are 14 entries in the DB so far.
The new id is created when you insert the data in the database. So the best thing would be to not show the id at all in the “insert new whatever” screen, since you don’t know it at that moment, and since the user can’t change it anyway.
If the user needs to know the id, then show it to him after the data has been succesfully inserted in the database.
Ok thanks for the reply had thought of that to begin with.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.