PHP - How To Auto_increment 2 Colloums Not Sure If This Php Or Sql
how can i have 2 AUTO_INCREMENT colloums ?
i need my id column and my position column to Auto increment. i cant use the id column to set my position as i need to change the val and as i no u cant change ur prim key auto increment column ???? so any forts how i can get a drop down list box to show the content of column `position` (in format 1,2,3,4,5,6,7ect ) and auto increment when adding a new project. my idea when adding is to get the form page to read the bottom of the `position` column for the number and then add one and set that val to a read only text field on the project add page. is there an easy or better way to do this and how would one go about doing this ??? as im a noobie but getting there how-tos or code samples will help a lot people and im wanting to learn as well so any good php tutorial sites send them ,my way thanks Similar TutorialsHello, how can i reset Auto_increment to 0? because i've made some tests with my database and now may entrys start from value 19.. My question is basically this: If I'm building a submission form - which places info into my DB via a mySQL query (INSERT INTO) - is there also a way to reference the id that it is creating? The form is set to just dump raw data into a database - each submission enters data into at least 8 DB tables which are all tied together by an $id row in each table. My query references those $id rows in each table to build a query. After each query is completed, a unique url (which is stated by the submitter in the form of /example/someotherword/) is generated. I need to find a way to place some sort of script within a page that displays the results based on each $id. So, lets say that the url is clicked, it would take you to a page that displays the results - but only does so based on the reference to that urls unique $id within the table. I'll provide code once I get home, but if you guys have any ideas that would be great. |