oracleguy
11-28-2002, 02:18 AM
Okay I have a mysql database (of course.. :)) and when I run the 'update' command it doesn't seem to actually do it. It doesn't come back with any errors either.
Here is my code... its ASP btw.
set checkedIn = lpSQL.Execute("select * from CheckIn where picked='0';")
If checkedIn.EOF then
errAll="1"
else
Dim Guests(1000)
Dim GID(1000)
Dim x
x=1
Do while not checkedIn.EOF
Guests(x)=checkedIn("Name")
GID(x)=checkedIn("ID")
x=x+1
checkedIn.MoveNext
Loop
Dim Final
Randomize
Do
Final=Int((x - 1 + 1) * Rnd + 1)
If not Guests(Final)="" then exit do
Loop
lpSQL.Execute("UPDATE CheckIn SET picked=1 WHERE Name=' & Guests(Final) & ';")
The red line is the sql query i'm talking about. So what am I doing wrong?
Here is my code... its ASP btw.
set checkedIn = lpSQL.Execute("select * from CheckIn where picked='0';")
If checkedIn.EOF then
errAll="1"
else
Dim Guests(1000)
Dim GID(1000)
Dim x
x=1
Do while not checkedIn.EOF
Guests(x)=checkedIn("Name")
GID(x)=checkedIn("ID")
x=x+1
checkedIn.MoveNext
Loop
Dim Final
Randomize
Do
Final=Int((x - 1 + 1) * Rnd + 1)
If not Guests(Final)="" then exit do
Loop
lpSQL.Execute("UPDATE CheckIn SET picked=1 WHERE Name=' & Guests(Final) & ';")
The red line is the sql query i'm talking about. So what am I doing wrong?