mysql - PHP MyAdmin Inserting data twice -


i adding afew tables current database drive online menu.

so far have created 'menu categories' table. below table structure.

create table if not exists `menu_categories` (   `id` int(2) not null auto_increment,   `cat_id` varchar(6) not null,   `cat_name` text not null,   primary key (`id`),   unique key `cat_id` (`cat_id`) ) 

i have yet write pho scripting wanted insert few dummy categories testing, when insert category , browse table data has been entered twice, 2 of each category.

i have looked around , cannot life of me figure out why, php myadmin?

below print screen of inserting data , end result:

inputting dummy data

inputting dummy data

the sql query inserting dummy data

the sql query inserting dummy data

preview of table duplicate entries

preview of table duplicate entries

any idea going on here?

thanks

*edit: forgot add tried setting 'cat_id' unique. when ran insert command, received error inserting duplicate data

okay, having same issue, , realized inserting data in table.

i figured out this: when press insert , fill out field , press go, going taken page has command line query notice on top showing message: "one row has been inserted, inserted row id 3" in light green bar.

the mistake making was: clicking "go" button @ bottom of query line command, , inserting query in table again. so, instead of clicking "go" click "browse" button on top navigation bar that's next "structure" button.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -