This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved Retrieve data from sql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
N3v3rM1nd
Member
Join Date: Apr 2021
Old 05-03-2024 , 10:26   Re: Retrieve data from sql
Reply With Quote #1

So, I've looked over the code. I don't want to use "SQL_MakeStdTuple()" because I'm using SQLite and it doesn't help me that much.

Returning to the code, what you gave me doesn't work. I just want a simple function to retrieve the player's position from MySQL and its related information, that's all.
N3v3rM1nd is offline
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 05-03-2024 , 20:45   Re: Retrieve data from sql
Reply With Quote #2

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
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode