Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Amending the already uploaded database entries!

Status
Not open for further replies.

tasmeem

Technical User
Feb 4, 2006
2
HK
hi,
i hav uploaded the sql file to store the values in mysql db, but unfortunately some values are saved twice or more than once. there is no promary or forigen key in db...but ther is unique value in evry row by which i can spot those entries out. should i use php or sql to delete the repeated rows?
 
Here is the basic SQL for deleting something:
Code:
DELETE FROM [COLOR=red]name_of_your_table[/color] WHERE ([COLOR=red]name_of_unique_field[/color]=[COLOR=red]a_unique_number_to_match[/color]) LIMIT 1;
All this - and more, at the mySQL Online Manual (free for all to read).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
another useful example of the non-ansi LIMIT function. it's almost enough to cause me to give up using abstraction layers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top