Update SQL Problem

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Update SQL Problem

Postby lastowl » 04 Feb 2011, 22:30

Im trying to add the userID to the db on each login so i came up with:

Code:
Enabled = res.userId
var dbID = row.getItem("Enabled");
dbase.executeCommand("UPDATE dbID='" + Enabled + "'" FROM login WHERE Username='" + nick + "'" );


It looks wrong to me, but something similar worked in a different sql environment i use but it also comes up with no error and doesn't work in unity.
I tried quite a few variations this is where my ideas ended, Its most likely badly wrote SQL but its after working a long stretch and i would appreciate someone pointing out my stupidity :)
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 06 Feb 2011, 03:30

Try:

Code: Select all

dbase.executeCommand("UPDATE dbID='" + Enabled + "' FROM login WHERE Username='" + nick + "'" );


You had a double quote just before 'FROM' - maybe that was it?
Smartfox's forum is my daily newspaper.
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 06 Feb 2011, 11:38

thanks ill try that,

Edit that hasn't fixed everything but I'm having a complete re-look at everything first

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 15 guests