DB connection Manager

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

Moderators: Lapo, Bax

hellopaso
Posts: 43
Joined: 10 Dec 2011, 12:41

Post by hellopaso »

hello there,

thanks guys, now everything seems clear.


just another question ;)

there are some records in DB that can be changed apart from SFS extension.
so how do I find about this?

I should call DB myself and see if a record is changed?

or there is build in function in SFS?

(sth like eventListener that listen for any change in DB in selected table)
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Post by Sigtran »

you should probably redesign... else, you can send an event to the server via AS or java or any other language SFS supports :) i.e. a change was made to db via a php script, a reply is sent to the user about the change sucess, user sends an event to sfs extension, which then looks at a change that was made in the db... this is a bad design tho, you are better off just making changes to db via sfs, thus sfs will know what changes it has made (if you save them in a session or something)...

OR, you could use system calls, i.e. in php/c++ you could make something like:

//blabla some code to change db
//blbla check if success{
system('java someClientEmulatingExtension'); //run sfs extension to create an event
}

Making a cron-like script to see if there any changes is most inefficient...
hellopaso
Posts: 43
Joined: 10 Dec 2011, 12:41

Re: DB connection Manager

Post by hellopaso »

Post Reply