Hi,
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.
Thanks all.
--nik