MySQL Query error
#1

I was working on a scratch project, a CnR running with MySQL R5 perfectly fine but then I had to leave it for a while.

So I came back to it yesterday and found this weird bug thing with saving/loading (though as I remember before I leave it, it was perfectly fine)

Queries are not executed for some reason, but the connection to MySQL is working.

pawn Код:
CMD:test(playerid,params[])
{
    new str[128];
    format(str,sizeof(str), "SELECT `ID` FROM `accounts` WHERE `name`='%s'", GetNameEx(playerid));
    if(mysql_query(str))
    {
        SendClientMessage(playerid, -1, "Mysql query was successfully sent");
    }
    else
    {
        SendClientMessage(playerid, -1, "MySQL query failed.");
        if(mysql_ping()) SendClientMessage(playerid, -1, "MySQL connection is alive.");
        if(!mysql_ping()) SendClientMessage(playerid, -1, "Connection to the MySQL Database is dead.");
        return 1;
    }
    return 1;
}
Command I used for testing, I even executed it in the phpmyadmin query and it worked fine. (Replacing %s with a name)

I tried downloading R6 instead of R5, compiled with new version, running with new plugin, and still same error.

Any help would be appreciated.


Note: All queries are not being executed not only that one, stuff like saving/loading players, saving/loading business-es, atms, etc.


EDIT:
pawn Код:
#define host "localhost"
#define user ""
#define pass ""
#define database "testing"
Reply


Messages In This Thread
MySQL Query error - by MattTucker - 18.08.2014, 14:29
Re: MySQL Query error - by Siralos - 18.08.2014, 14:46
Re: MySQL Query error - by MattTucker - 18.08.2014, 15:03
Re: MySQL Query error - by DobbysGamertag - 18.08.2014, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)