Hi,
DevBoyLars wrote:Ok, so there's no direct-way to use something like a MySQL for every client without server-side coded software?
For sure you could do this. If you can reach your MySQL directly from the internez, go on. Just make sure that no 2 users ever try to modify the same record at the same time! ;-)
This can be done marking the record to be "in use" before editing, and un-marking it after, and hoping this all will really work in an environment where's latency and lag. (check for "semaphor", "mutex", "lock") *1)
And be sure to have nothing important in this database, because chances are good it gets hijacked within a short time ...
{Input in field User: "John Doe'); Drop table USER;--"}
Or, and that's what most ppl do, you have some kind of "middleware". A process running on the server that acts as an "agent" between your users and the database. (Often such is made in PhP, but LC server, or even a LC standalone should do the trick as well, with less hassle. The thread ghettocottage has linked should be full of information related.)
Now all traffic is bundled on this agent, and you have 2 big advantages:
- Since your agent gets all the queries, it will nicely fulfill one after the other, and you don't need to care about write conflicts any more.
- Since all queries go through your agent, you have a nice point where you can filter entries - for instance, reject anything that contains certain chars like ";" etc.
Have fun!
*1) And if you use MySQL, be sure your tables support transactions - MyISAM doesn't! Choose your table type wisely or suffer later!