sasha85
asked on
error:Expected end of statement
what is wrong here:
mySQL="UPDATE demo SET filed=1 WHERE id = " & deletionList[i]
?
mySQL="UPDATE demo SET filed=1 WHERE id = " & deletionList[i]
?
dim ppermit,deletionList
ppermit=request.form("fordeletion")
If ppermit<>"" then
deletionList = Split("deletionList", ", ")
dim mySQLp, conntempp, rstempp
For i=0 To UBound(deletionList)
mySQLp="UPDATE demo SET filed=DATE_ADD(LOCALTIME(),INTERVAL 420 minute) WHERE id = " & deletionList[i]
call updateDatabase(mySQLp, rstempp, "modipexe.asp")
response.redirect "opo.asp"
Next
End if
what is deletionList[i]? is it a field or any control in form?
if it is a field name, you should use [tablename].[fieldname]
You also should write Next i
if it is a field name, you should use [tablename].[fieldname]
You also should write Next i
ASKER
deletionList is a list of id's...
for example
deletionList= 1, 2, 3, 4
for example
deletionList= 1, 2, 3, 4
ASKER
why i need use next i?
http://www.elated.com/articles/looping-the-loop/
http://www.elated.com/articles/looping-the-loop/
sasha85,
What if you don't use the For and just run it 1 time? Do you still get the error?
What is the code for updateDatebase()? That may be the place with the error. If you copy the subroutine in to the loop and use it that way what is the result?
Let me know if you have any questions or need more information.
b0lsc0tt
What if you don't use the For and just run it 1 time? Do you still get the error?
What is the code for updateDatebase()? That may be the place with the error. If you copy the subroutine in to the loop and use it that way what is the result?
Let me know if you have any questions or need more information.
b0lsc0tt
ASKER
if i am using this one time(no array) its working...
but here is the all code:
(this kind of double question now...cause another question i posted got into this same point...)
i will be be glad if you follow me to
https://www.experts-exchange.com/questions/23135462/posting-checkboxes.html
:)
but here is the all code:
(this kind of double question now...cause another question i posted got into this same point...)
i will be be glad if you follow me to
https://www.experts-exchange.com/questions/23135462/posting-checkboxes.html
:)
dim ppermit,deletionList
ppermit=request.form("fordeletion")
If ppermit<>"" then
deletionList = Split("ppermit", ", ")
dim mySQLp, conntempp, rstempp
For i=0 To UBound(deletionList)
mySQLp="UPDATE mmo SET filed=1 WHERE id = " & deletionList(i)
call updateDatabase(mySQLp, rstempp, "modipexe")
Next
End if
----
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-community-nt]Unknown column 'ppermit' in 'where clause'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
looking good!:)
ASKER
For i=0 To UBound(deletionList)
mySQLp & i="UPDATE demo SET filed=1 WHERE id = " & deletionList[i]
call updateDatabase(mySQLp & i, rstempp & i, "modipexe" & i)
Next
and that not working as well...i got syntax error