I found the problem.
When you want to dispaly the primary key (that's autoincremented)you need to explicitly state that in the insert command ie
INSERT(id,name,age) values('', 'name','age')
In the above I have id in the columns but not the values.
This solved the problem.
Thank you for...
Yes ! I can see the ID field when using phpMYAdmin - this is what is confusing me ??? It is autoincrementing perfectly.
Why can I not see it when I output the data ???
Thanks
Hi
I am new to MySQL/PHP. I wanted to see if I could set up a database table in an existing database and output the data into a web page. Everything works OK except that I cannot see the ID column. This is the primary key (auto_increment)
Here's the strange thing, I can see the ID...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.