SQLite local database
How to make SQLite local database? I searched but didn't find any tuts :/
|
Re: SQLite local database
SQL_SetAffinity("sqlite");
SQL_MakeDbTuple("localhost", "root", "", "database"); |
Re: SQLite local database
You need to make sure that sqlite module is running (you can start it from plugin with #pragma loadlib sqlite).
If mysql module is running too then you have to use SQL_SetAffinity("sqlite") before making tuple. Make tuple using: g_sql_tuple = SQL_MakeDbTuple("", "", "", "filename") Your database will be saved in addons\amxmodx\data\sqlite3\filename.sq3 You can then view and edit your database using other tools like http://sourceforge.net/projects/sqlitebrowser/ |
Re: SQLite local database
Quote:
Quote:
But which tuple type is the right one - with or without (you hihi) login data? EDIT: Does anything else changes from MySQL? Or everything remains the same? |
Re: SQLite local database
From my experience I can say that login data does not matter when using sqlite, but still most of my plugins use similar code to what YamiKaitou posted ("127.0.0.1", "root", "", ...).
Some mysql queries may not work with sqlite, but if you design them properly you can make them work with both. |
Re: SQLite local database
SQLite (for AMXX) does not have login credentials, so any that you pass will be ignored. I only include it for my benefit and readability
|
Re: SQLite local database
Quote:
Anyways, thanks guys, much appreciated. |
Re: SQLite local database
You could, but why make calls to natives that you don't need?
|
| All times are GMT -4. The time now is 17:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.