Update DB Manager Syntax

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

FireSmartFox
Posts: 33
Joined: 28 Sep 2018, 19:47

Update DB Manager Syntax

Postby FireSmartFox » 27 Nov 2018, 20:05

Hi,
I am able to perform SELECTs and work with the data.
Just one line after I tried this:

Code: Select all

dbManager.executeUpdate("UPDATE table1 SET time_pulled=NOW() WHERE id= ?", new Object[] {id});

id is a valid int, the row is existing.
I get no error in the logs, but also no update.
I don't find a lot about how to use the Update in the docs.
Is this line in general okay?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Update DB Manager Syntax

Postby Lapo » 28 Nov 2018, 08:15

Hi,
are you sure the code is actually executed?
Can you add a trace before and after the DB call to make sure it is?

What version of SFS2X are you using?
Which database do you use?

Also are you sure there are no errors at the Zone initialization with the database? If there's an init error then you might not be able to execute any DB code until you fix that problem first. Check the logs of the SFS2X startup, it lists every Zone being launched.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 133 guests