Re: [PHP] AUTO_INCREMENT with MySQL phpmyadmin
I don't know why your query isn't working, but why aren't you using phpMyAdmin's add field section? Browse the tables definition page, and underneath the column descriptsion, is a line that says Add new fields [textbox: #][popup:At End of Database][button: Go] That brings up a fully functional column add page. Unless your permissions don't allow you to alter tables? Double check that. On 4/6/01 10:35 PM, "Plutarck" [EMAIL PROTECTED] wrote: At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? -- Plutarck Should be working on something... ...but forgot what it was. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] AUTO_INCREMENT with MySQL phpmyadmin
At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? -- Plutarck Should be working on something... ...but forgot what it was. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] AUTO_INCREMENT with MySQL phpmyadmin
-Original Message- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Friday, April 06, 2001 10:35 PM To: [EMAIL PROTECTED] Subject: [PHP] AUTO_INCREMENT with MySQL phpmyadmin At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? Can you post the current schema (design) of the table with datatypes, etc. http://www.newbienetwork.net/sections.php?op=viewarticleartid=10 Also, check out the above link, that my help some. Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]