var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to assign unique ID for deletion
I am a MySQl-PhP beginner, and I have a question regarding the deletion query.
I have a table with fields:
first name, last name and full name.
Field Type Null Key Default Extra
-------- ------- ------ ------ ------- ------
id int(5) PRI 0
First Name text YES (NULL)
Last Name text YES (NULL)
Full Name text YES (NULL)
I want to delete the record after checking/sorting using last name.
My query for that case is:
"DELETE from db WHERE LastName='$LastName' ";
Now suppose, there are more than one records with the last name "Jones"; it deletes all of 'em.
How do I ensure that I delete just ONE particular record with the last name "Jones"?
Any pointers/URLs to read/suggestions would be welcome.
which Jones row do you want to delete? how do you distinguish it from the other Jones rows?
Originally Posted by nik007