[Include] Easy MySQL - Simplifying the usage of MySQL queries!
#39

The following code is not working:
PHP код:
    new string[128], names[24],money;
    new 
handle SQL::OpenEx(SQL::MREAD"Accounts""Money""""""", -110, -1"Money");
    
SQL::ReadRetrievedRows(handlei)
    {
        
SQL::ReadString(handle"AccountName"names24i);
        
SQL::ReadInt(handle"Money"moneyi);
        
format(stringsizeof(string), "Name %s | Money: %d"names,money);
        
SendClientMessage(playerid, -1string);
    }
    
SQL::Close(handle); 
Accounts in DB: 7

In the Mysql log:
PHP код:
[13:42:36] [DEBUGmysql_query(1"SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 "1)
[
13:42:36] [DEBUGCHandle::Execute(this=0x4f8c170type=3query=0x6705fd0)
[
13:42:36] [DEBUGCConnection::Execute(query=0x6705fd0this=0x674f80connection=0x4fa5968)
[
13:42:36] [DEBUGCQuery::Execute(this=0x6705fd0connection=0x4fa5968)
[
13:42:36] [INFOquery "SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 " successfully executed within 0.616 milliseconds
[13:42:36] [DEBUGCResultSet::Create(connection=0x4fa5968query_str='SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 ')
[
13:42:36] [DEBUGcreated new resultset '0x6710788'
[13:42:36] [DEBUGfetched MySQL result '0x66f8990'
[13:42:36] [DEBUGallocated 0 bytes for PAWN result
[13:42:36] [DEBUGCHandle::Execute - return valuetrue
[13:42:36] [DEBUGmysql_query: return value'1'
[13:42:36] [DEBUGcache_is_valid(1)
[
13:42:36] [DEBUGcache_is_valid: return value'true'
[13:42:36] [DEBUGcache_get_row_count(0x05FFF1E0)
[
13:42:36] [DEBUGcache_get_row_count: return value'1'
[13:42:36] [DEBUGcache_get_row_count(0x05FFF1D8)
[
13:42:36] [DEBUGcache_get_row_count: return value'1'
[13:42:36] [DEBUGcache_is_valid(1)
[
13:42:36] [DEBUGcache_is_valid: return value'true'
[13:42:36] [DEBUGcache_delete(1)
[
13:42:36] [DEBUGcache_delete: return value'1' 
Tried too: new handle = SQL::Open(SQL::MREAD, "Accounts", "Money", -1, "", -1, "", -1, -1, "Money");

But no data in chat!
Reply


Messages In This Thread
Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 11.05.2016, 16:16
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Evoturk - 11.05.2016, 16:18
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Unrea1 - 11.05.2016, 16:22
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 11.05.2016, 16:25
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Sensation - 11.05.2016, 18:40
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 11.05.2016, 18:41
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Sensation - 11.05.2016, 18:42
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Sensation - 11.05.2016, 18:49
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Luicy. - 19.06.2016, 08:22
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 19.06.2016, 10:22
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by pawnuser - 21.06.2016, 05:30
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 21.06.2016, 10:21
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by pawnuser - 21.06.2016, 10:58
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 21.06.2016, 13:30
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by pawnuser - 21.06.2016, 15:50
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 21.06.2016, 16:47
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by pawnuser - 21.06.2016, 17:07
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Stones - 21.06.2016, 19:45
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 05.09.2016, 21:23
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by morris91 - 06.09.2016, 11:18
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 06.09.2016, 11:23
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by morris91 - 06.09.2016, 11:25
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 06.09.2016, 12:16
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by F1N4L - 06.09.2016, 12:21
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by morris91 - 06.09.2016, 12:52
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 15.09.2016, 15:37
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by vernz - 07.11.2016, 01:30
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by GeneralAref - 19.12.2016, 10:51
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 19.12.2016, 12:09
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Zoie - 04.04.2017, 09:17
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 24.11.2017, 17:36
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by RowdyrideR - 10.01.2018, 15:37
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 10.01.2018, 15:41
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by RowdyrideR - 11.01.2018, 01:07
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by ThePhenix - 11.01.2018, 01:55
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by RowdyrideR - 11.01.2018, 17:35
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by ThePhenix - 11.01.2018, 17:45
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by RowdyrideR - 11.01.2018, 18:26
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 13.05.2018, 16:24
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Private200 - 13.05.2018, 20:58
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 13.05.2018, 21:00
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Private200 - 13.05.2018, 21:08
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 13.05.2018, 21:36
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Akeem - 06.06.2018, 15:21
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 06.06.2018, 16:25
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by altunatively - 14.06.2018, 19:30
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 23.06.2018, 13:46
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 23.06.2018, 13:49
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 23.06.2018, 14:14
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 23.06.2018, 14:21
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 23.06.2018, 14:26
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 23.06.2018, 14:56
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by CantBeJohn - 17.09.2018, 04:34
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 17.09.2018, 16:34
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by CantBeJohn - 18.09.2018, 01:52
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Amagida - 21.09.2018, 16:23
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by solstice_ - 21.09.2018, 17:25
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 29.09.2018, 12:10
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by GameOvr - 12.10.2018, 07:55
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by CantBeJohn - 09.07.2019, 19:24
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Gammix - 09.07.2019, 21:45
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Aerotactics - 17.07.2019, 03:35
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 18.05.2020, 19:48
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 19.05.2020, 12:02
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 20.05.2020, 01:24
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Stefan_Toretto - 22.05.2020, 20:57
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by Max_Andolini - 01.06.2020, 01:03
Re: Easy MySQL - Simplifying the usage of MySQL queries! - by JR_Junior - 23.06.2020, 22:30

Forum Jump:


Users browsing this thread: 1 Guest(s)