View Full Version : delete a specify data instead of the whole row of record
scriptblur
10-10-2002, 03:08 AM
Hi guys.... hope some one can help me please>>>>>
is it that using delete property by sql statement can only delete one row of record in the database? i only wish to delete a specify section of data in the record and not the whole row of record.....can this be done??? or do anyone have a better suggestion??? thank you.....
BigDaddy
10-10-2002, 04:16 AM
Update the row, setting the field or fields in question to null or "" if you don't want to delete the whole row.
http://www.w3schools.com/sql/sql_update.asp
scriptblur
10-10-2002, 04:43 AM
ok. thank you...
actually i know this method can be used... but just want to see if there is a better method....
BigDaddy
10-10-2002, 04:53 AM
You're looking to delete only a few certain fields? Or a number of rows that meet a criteria?
Morgoth
10-10-2002, 04:55 AM
Well, what do you mean by deleting a field in the row?
If it is unused by one row and used by other row, the only thing you can do is set it to it's default. Null, 00\00\00, 0, -453, Pi, False, Fired, Dead, Insane, Innocent (until proven guilty).
How else can you change it? Deleting the row will just change it back to it's default. Either nothing, or something else.
I suggest the way of changing it to what you need.
scriptblur
10-10-2002, 07:01 AM
hi there...
i just want to delete a few fields in a row instead of deleting the whole row.....
Morgoth
10-10-2002, 02:25 PM
Then I think the only way to do this is if you update the row with the fields that need to be deleted, to 0 or False or ""...
Are you trying to make the field that you want deleted disapear? or the text inside to not show up on your web page?
whammy
10-11-2002, 02:31 AM
Morgoth is right... if you don't want to delete the record, you have to update it to the values you DO want it to have. (Even if you just set the fields to Null or "").
I see that he has been learning a LOT! :)
scriptblur
10-11-2002, 04:53 AM
hi EVERYONE
i guess i have received every of yours messages..... thank a lot......
Morgoth
10-11-2002, 06:23 AM
Originally posted by whammy
Morgoth is right... if you don't want to delete the record, you have to update it to the values you DO want it to have. (Even if you just set the fields to Null or "").
I see that he has been learning a LOT! :)
I am almost perfect. Except for the fact I don't speak english yet. I am from planet Titologwenort.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.