Reputation: 49
I have 2 TABLES in a MySQL DB ,
but My Problem is : In just a single row DATA ARE NOT SELECTABLE for Edit, Delete and etc .
Please check the attached image to understand more .
Tell me what is the solution ..
Upvotes: 0
Views: 84
Reputation: 285
Take a look at the error:
"Current selection does not contain a unique column"
PHPMyAdmin can't select (or modify) something that it can't uniquely identify and query on.
It looks like you tried to set up an ID, but it appears they're both set to "0". You need to go into the table "structure" and set the column up as an auto-incrementing primary key.
It might complain that you have two "0" IDs so perhaps just delete the id column and create it again as an auto-incrementing primary key.
After than you should see those options.
This should fix your problem and the duplicate entry error:
ALTER TABLE q_and_a_january3 DROP COLUMN id;
ALTER TABLE q_and_a_january3 ADD id INT(11) AUTO_INCREMENT PRIMARY KEY;
This will delete your current ID's and reassign new IDs. Only use this if the data isn't important
Upvotes: 1