Help with MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with MySQL (
/showthread.php?tid=496461)
Help with MySQL -
S4t3K - 22.02.2014
Hi.
I use a_mysql include and mysql.dll plugin by BlueG (R7 version) and I would know two things.
First, how to launch a query, and also how to optimize my queries.
Thank for the one who'll answer.
Re: Help with MySQL -
Crazydriver - 22.02.2014
Re: Help with MySQL -
Konstantinos - 22.02.2014
https://sampforum.blast.hk/showthread.php?tid=337810
Quote:
Originally Posted by Crazydriver
|
That's not for R7.
Re : Help with MySQL -
S4t3K - 22.02.2014
I've done queries based on this model
PHP код:
new idx;
while(idx < sizeof(InfoMaison))
{
format(query, 1024, "ALTER TABLE Maisons WHERE `id`='%d' MODIFY `xEntree` DOUBLE NOT NULL '%f'", idx, InfoMaison[idx][xEntree]);
mysql_query(query);
}
But I got "error 035: argument type mismatch (argument 1)" on the line mysql_query
Someone has an idea (#BigNoobInSQL)
Re: Help with MySQL -
Konstantinos - 22.02.2014
It seems your version of a_mysql.inc is not for R7 but one of the latest version which mysql_query uses connection handle is first argument and the query (array) is the second argument.
Re : Help with MySQL -
S4t3K - 22.02.2014
Do you have the version which mysql_query doesn't use handles ?
It's quite boring because I just use one MySQL connection...
Re: Help with MySQL -
Crazydriver - 22.02.2014
I got the same error when i started to script my GM but when i downgraded it to Mysql R6 it worked try using Mysql R6 package
Re : Help with MySQL -
S4t3K - 22.02.2014
Thanks, I'll test now and i'll edit this post to tell you what happened
EDIT : Same with R6.
In the include, the native is
PHP код:
native mysql_query(query[],resultid = (-1),extraid = (-1),connectionHandle = 1);
So the query is called first.
Re: Help with MySQL -
Crazydriver - 22.02.2014
You get these error at compiling or after starting your server.exe
and if so post your Server.cfg file here
Re : Help with MySQL -
S4t3K - 22.02.2014
Just while compiling