DeveloperSide.NET Forums
December 09, 2019, 05:50:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: MYSQL HEADACHES  (Read 7137 times)
0 Members and 1 Guest are viewing this topic.
randy orr
Member
*
Posts: 2

randntam randy_orr
View Profile Email
« on: July 12, 2004, 02:52:58 PM »

Can someone please help m?! I am about to delete this thing and walk away!! I have almost all of the coding written and working on my pages to communticate with my database. One last query is keeping it from being finished... can someone take a look at this and tell me why I am getting a syntax error?

<% Response.Buffer = True %>
<!-- #include virtual="/common/adovbs.inc" --> <%
Dim Connect, Record, Query, ISOK
Set connect = server.createobject("adodb.connection")
Set Record = server.createobject("adodb.recordset")

ISOK = "YES"
if Request("Action") = "DELETE THIS RECORD!" then
connect.open "DATABASE"
query = "DELETE FROM 'TABLE' WHERE (ID=" & Request("EDIT") & ")"
Record.open query, connect, adOpenStatic, adLockOptimistic
Response.Write "Deleted record :" & request("Edit") & "<br>"
else
if request("Jobtitle") = "" then
Response.Write "<b>Job Title Name</b> Missing! Cannot Add Record!<br>"
ISOK = "NO"
end if
if ISOK <> "NO" then

if Request("EDIT") <> "" then
connect.open "DATABASE"
query = "SELECT FROM WHERE (ID=" & Request("EDIT") & ") limit 1"
Record.open query, connect, adOpenStatic, adLockOptimistic
Response.Write "Editing record :" & request("Edit") & "<br>"
else
connect.open "DATABASE"
query = "SELECT * FROM
"
Record.open query, connect, adOpenStatic, adLockOptimistic
Record.AddNew
Response.write "Adding Record<br>"
end if

Record("JobTitle") = Request("JobTitle")
Record("JobDesc") = Request("JobDesc")
Record("Jobloc") = Request("Jobloc")
Record("salary") = Request("salary")

record.update
if Request("EDIT") = "" then
Response.Write "Record Added Successfully<br>"
else
Response.Write "Record Edited Successfully<br>"
end if

end if 'if Request("Action") = "DELETE THIS RECORD!" then
end if 'if ISOK <> "NO" then
%>


It says that my error is "NEAR" the "DELETE FROM TABLE" query
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: July 12, 2004, 10:07:07 PM »

The only thing I can offer is a link to the "delete" syntax...

http://dev.mysql.com/doc/mysql/en/DELETE.html
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!