PDA

View Full Version : php unique id, phpmyadmin



bobdog
06-25-2007, 07:30 PM
Hi,

I need some help. I set up a database and forms. It won't show up in the sql query.

I think I went wrong somewhere by making an id a unique id. So I made a field called 'id' and set it as unique. but when I SELECT FROM nothing shows up in control panel.

The form is simple.

bobdog
06-25-2007, 08:17 PM
I have made some progress, but I can't get the unique id to work. It will post one person, but additional posts don't show up. Something wrong when I make id a unique id,

and my DATETIME doesn't work either. I must be doing something wrong in phpmyadmin.

lazynitwit
06-25-2007, 09:36 PM
Make sure you set the ID as "auto_increment" under Extra in phpMyAdmin.

redsox9
06-26-2007, 10:08 AM
Hi, bobdog:

This may or may not be helpful but you need to make one of your fields the PRIMARY field (usually your ID field) and have it auto_increment. To make that field PRIMARY, check the radio button beneath the icon with the key.

That should make it such that when a new row is added, that variable increments by one.

bobdog
06-26-2007, 06:44 PM
Yeah, I know. But for some reason, it is screwing up and I can't figure out why. Thanks for the suggestions. Anybody else have an idea?

I did figure out the datetime thing, I had my formatting in the wrong column in phpmyadmin 0000-00-00 00:00:00