SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 31/12/2016, 04:34 PM   #71
JR_Junior
Huge Clucker
 
Join Date: Nov 2011
Location: Brazil
Posts: 228
Reputation: 52
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Quote:
Originally Posted by Max_Andolini View Post
error 035: argument type mismatch (argument 4)

Line: return SQL::GetIntEntryEx("Accounts", "ContaID", "Nome", account);
JR_Junior is offline   Reply With Quote
Old 31/12/2016, 06:41 PM   #72
JR_Junior
Huge Clucker
 
Join Date: Nov 2011
Location: Brazil
Posts: 228
Reputation: 52
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Fixed!!!

The problem:
PHP Code:
 GetAccountID(const account[])
GetAccountID(account[]) // Removed the const and no error 
JR_Junior is offline   Reply With Quote
Old 04/01/2017, 04:57 PM   #73
justinnater
Huge Clucker
 
justinnater's Avatar
 
Join Date: Jan 2011
Posts: 270
Reputation: 78
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Code:
	
    handle = SQL::Open(SQL::MTREAD, "dynamic_builds");
    SQL_GetCallback(handle, hid)
    {
        new check_id;
        SQL::ReadInt(handle, "Id", check_id, hid);
        printf("test");
        new check_type;
        SQL::ReadInt(handle, "TYPE", check_type, hid);
        if(check_type==3)
        {
            if(SQL::RowExists("player", "TOTEM", check_id)==0)
            {
		    
            }
        }
    }
    SQL::Close(handle);
The loop is only being called 1 time.
When I remove the
Code:
if(SQL::RowExists("player", "TOTEM", check_id)==0)
the loop works fine.

Am I doing something wrong or?
justinnater is offline   Reply With Quote
Old 06/01/2017, 11:07 PM   #74
justinnater
Huge Clucker
 
justinnater's Avatar
 
Join Date: Jan 2011
Posts: 270
Reputation: 78
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Anyone?
justinnater is offline   Reply With Quote
Old 08/01/2017, 10:04 AM   #75
LikeNPC
Big Clucker
 
Join Date: Jan 2013
Posts: 63
Reputation: 0
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

I cant create player query rows this way....
Quote:
SHA256_PassHash(inputtext, "", playerData[playerid][password], 64);
new handle = SQL::Open(SQL::INSERT, "players");
SQL::ToggleAutoIncrement(handle, true);//Toggles auto increment, SQL::Close will return cache_insert_id();
SQL::WriteString(handle, "p_name", ret_pName(playerid));
SQL::WriteString(handle, "p_password", playerData[playerid][password]);
SQL::WriteInt(handle, "p_ammo", 0);
SQL::WriteInt(handle, "p_reload", 0);
SQL::WriteInt(handle, "p_weapontype", -1);
SQL::WriteInt(handle, "p_skin", 29);
SQL::WriteInt(handle, "p_interior", 5);
SQL::WriteInt(handle, "p_vw", 0);
SQL::WriteInt(handle, "p_tutorial", 0);
SQL::WriteInt(handle, "p_race", 0);
SQL::WriteInt(handle, "p_gender", 0);
SQL::WriteInt(handle, "p_group", 0);
SQL::WriteInt(handle, "p_disease", 0);
SQL::WriteInt(handle, "p_quest", 0);
SQL::WriteInt(handle, "p_bleeding", 0);
SQL::WriteInt(handle, "p_hunger", 0);
SQL::WriteInt(handle, "p_thirst", 0);
SQL::WriteInt(handle, "p_keys", 0);
SQL::WriteInt(handle, "p_weaponsecondary", 0);
SQL::WriteInt(handle, "p_bullet", 0);
SQL::WriteInt(handle, "p_nicolasmission1", 0);
SQL::WriteInt(handle, "p_nicolasmission2", 0);
SQL::WriteInt(handle, "p_davemission1", 0);
SQL::WriteInt(handle, "p_davemission2", 0);
SQL::WriteInt(handle, "p_gas", 0);
SQL::WriteFloat(handle, "p_posx", 318.7517);
SQL::WriteFloat(handle, "p_posy", 316.5056);
SQL::WriteFloat(handle, "p_posz", 999.1484);
SQL::WriteFloat(handle, "p_health", 100.0);

new itemQuery[32];
for(new i=0; i<sizeof(itemData); i++)
{
format(itemQuery, sizeof(itemQuery),"item_%d",i);
SQL::WriteInt(handle, itemQuery, playerItem[playerid][i]);
}
playerData[playerid][pID] = SQL::Close(handle);
LikeNPC is offline   Reply With Quote
Old 04/04/2017, 09:17 AM   #76
Zoie
Little Clucker
 
Join Date: Nov 2015
Posts: 1
Reputation: 0
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

I don't know how to fix the string in the MySQL database with SQL:: WriteString write a garbled code, can you give me an example?
Zoie is offline   Reply With Quote
Old 24/11/2017, 05:36 PM   #77
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 327
Reputation: 37
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Updated version 3.4

- Bug fix.

Compatible MySQL version R41-4.
Max_Andolini is offline   Reply With Quote
Old 10/01/2018, 03:37 PM   #78
RowdyrideR
Huge Clucker
 
Join Date: Dec 2010
Posts: 206
Reputation: 11
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Error

Code:
invalid function or declaration
??
__________________

Your Rep+'s appreciated.

Scripter, Just PM me.
-----

RowdyrideR is offline   Reply With Quote
Old 10/01/2018, 03:41 PM   #79
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 327
Reputation: 37
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Quote:
Originally Posted by RowdyrideR View Post
Error

Code:
invalid function or declaration
??
Line?
Max_Andolini is offline   Reply With Quote
Old 11/01/2018, 01:07 AM   #80
RowdyrideR
Huge Clucker
 
Join Date: Dec 2010
Posts: 206
Reputation: 11
Default Re: Easy MySQL - Simplifying the usage of MySQL queries!

Almost every line in that registration example
__________________

Your Rep+'s appreciated.

Scripter, Just PM me.
-----

RowdyrideR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Easy SQLite: Simplyfing the usage of SQLite queries! ThePhenix Includes 7 14/07/2018 10:12 AM
[Include] Easy MySQL 1.0 - Simplifying the usage of MySQL queries! ThePhenix Includes 93 08/01/2017 04:04 AM
[Tutorial] MySQL-queries iRaiDeN Tutorials 2 21/03/2014 03:20 PM
Help with MySQL queries LiamM Scripting Help 4 20/03/2013 10:37 AM


All times are GMT. The time now is 12:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.