Jump to content

confus with a simple problem


karikamiya

Recommended Posts

K, so i got a table:

 

 

+---------+----------+
| imageid | tag      |
+---------+----------+
|       1 | celestia |
|       1 | official |
|       1 | flying   |
|       2 | celestia |
|       2 | official |
|       2 | flying   |
+---------+----------+

 

it was going all ok until i noticed there were some duplicates of both rows

 

+---------+----------+
| imageid | tag      |
+---------+----------+
|       1 | celestia |
|       1 | celestia |  <<< BAD
+---------+----------+

 

How can i:

 

1) delete the shown duplicates

2) set the table to not allow a duplicate of both rows to be inserteds

 

im using mysql 5.5.9

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/228438-confus-with-a-simple-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.