0

Hi
What i want to do is using php code to write to delete the entire row in the db. each row has its own id, field and content. instead of deleting the row with the id, can i do by the field name? how would i do this?

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by futhonguy
-1

yes you can always do that provided that the field name has unique constraint on it.Otherwise you will end up deleting more than one row with the same field name but different ids.
Is this a duplicate thread you created. If in case, you forgot the one, after you created it, you can always see the threads started by you in the profile or else browse the threads subscribed by you; both options accessible from the control panel one of the menu from the row of top header menus

Edited by network18: Edit: Duplicate thread?

-2

This is simple, just instead of WHEREing the id in your query, you should WHERE the field. BUT take care with this, if you have two or more rows in which the field have the same name, then I'm afraid you'll be deleting all of these rows...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.