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!

deleteing a specific page

Status
Not open for further replies.

danjapro

Programmer
Aug 27, 2004
54
US
This is the url and the page id

I would like to delte just this page specifically how would i rite the cod eto the page in this url



my delete statment.

if len(ssid) => 1 then
strSQL = "Delete* from tblPageContent where MainMenuLinkID = " 4" and MenuLinkID = " 18 " and SubmenuLinkID = " 18
else
if len(sid) => 1 then
strSQL = "Delete * from tblPageContent where MainMenuLinkID = " 4" and MenuLinkID = " 18
end if
 

there are few things to point out before giving solution to this one..

you haven't mentioned what is ssid doing there

you are using incorrect syntax at => supposed to be >= if you want to check Greater than equal

no point in having same condition for both if any else statemetns..

 
Generally, with lots of guessing about your page, it should look something like this:
Code:
If Request.QueryString("ssid") <> "" Then
    strSQL = "DELETE * FROM tblPageContent WHERE MainMenuLinkID = " & Request.Querystring("sid") & " AND MenuLinkID = " & Request.QueryString("ssid") & " AND SubmenuLinkID = " & Request.Querystring("sid")
End If
with some other stuff for your else condition... frankly, I'm not understanding the difference between sid and ssid and id and which ones match up with which field names, nor why your SQL changes based on the existence of one or the other (where the logic you have now doesn't really work)... maybe you could explain some more about what is what.
 
I got it fixed ............Thanks for your support however.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top