The anti-spam plugins have stopped being effective. Registration is back to requiring approval. After registering, you must ALSO email me with your username, so that I can manually approve your account.

Main Menu

After a long time... (SQLite Related)

Started by Raven, May 01, 2006, 12:10:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


... I've decided to do something worthwhile with my space here.

The problem is I wanted to use some MySQL stuff... and it appears that Xepher wants us to move away from that (I can't make new tables in PHPMyAdmin anyway for some reason).

Basically, I've never used SQLite before, and I was wondering first of all, how do I access the database interface for it? Is there one?

Secondly, are they are major differences in coding between MySQL and SQLite?


SQLite doesn't have a database server the way MySQL does. When used in an application, it lets the application read/write directly to a database file. As such, there's not any centralized admin interface like we have with phpmyadmin. From a coding standpoint, there's almost no difference. There's a few technicalities in SQL syntax that are different (like quotes vs. doublequotes) but otherwise it's almost the exact same functions as MySQL, save that you won't be connecting to a server with the connect function, but will instead give a filename ot use as the database. If you're talking about writing something in PHP it's really easy. Basically just used the sqlite functions instead of mysql... so something like mysql_query() would become sqlite_query()


MySQL is a database server, where as SQLite is not. In the event of extremely large traffic and information exchange, I hear that MySQL actually out preforms SQLite quite a bit. SQLite is more suited for smaller operations due to this, so I myself dropped it as a possibility for game server data storage. :P
(\_/)    ~Relakuyae D'Selemae
(")_(")  [Libre Office] [Chrome]


Just to be clear, he's talking about "Extremely large traffic" there. Yeah, you don't run world of warcraft on SQLite. For any sort of web-based scripts and such (at least for sites smaller than ebay/amazon/etc) SQLite is more than enough. On this forum, it's about 10x faster than MySQL was in terms of actual CPU time, and I estimate it would take about 30 posts/second (constantly being posted) to get to where MySQL and SQLite were about equal.