Thread: [Solved] Retrieve data from sql
View Single Post
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 05-03-2024 , 20:45   Re: Retrieve data from sql
Reply With Quote #7

Have you tried going to amxmodx/configs/sql.cfg, and changing the driver type from "mysql" to -> "sqlite"?

Code:
amx_sql_host "<fill in your actual host>"
amx_sql_user "<fill in your actual username>"
amx_sql_pass "<fill in your actual password>"
amx_sql_db "<fill in your actual database>"
amx_sql_type "sqlite"
You need to make sure your credentials are correct. It doesn't work if there's no successful connection to the database.

Quote:
Originally Posted by N3v3rM1nd View Post
I just want a simple function to retrieve the player's position from MySQL
This plugin actually does just that. There's no 'magic function' to just know player's rank "and its related information", without querying the database, lol. There's no extra shenanigans here, just that query. Also, you just said you're using SQLite and not MySQL, so which one is it? These are 2 different databse systems.

SQL_MakeStdTuple is not the issue, as the name of the library <sqlx> suggests, its supposed to work with both MySQL and SQLite. Saying "it doesn't work" is not very helpful. If you have issues, provide any error logs with debug turned on.

In your plugins.ini:

Code:
zm_rank.amxx debug
But first, just make sure your sql.cfg is actually setup correctly, then try again.
__________________
Rohanlogs is offline