MySQL don't work sometimes - 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: MySQL don't work sometimes (
/showthread.php?tid=586839)
MySQL don't work sometimes -
]mxco[ - 25.08.2015
Hey there, I'm really confused, what is going on in my script.
I'm using "easy-to-use" StrickenKid's mysql plugin.
The problem is, that my sql query isn't returning
sometimes what it should return. For instance:
It has to return player nickname and sometimes it returns database name
realnyzivot_server as you can see here:
I'm sure it isn't caused by plugin, because it did even before plugin update (change)
My function looks like this:
Код:
new query[150],data[512];
format(query,sizeof(query),"SELECT %s FROM %s WHERE %s LIMIT 1",value,table,podminka);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 0){
format(data,sizeof(data),"");
} else {
mysql_fetch_field(value,data);
}
mysql_free_result();
return data;
I ran out of ideas.
Re: MySQL don't work sometimes -
CrazyChoco - 25.08.2015
StrickenKid's plugin is outdated. Use mysql r39-3.
Re: MySQL don't work sometimes -
]mxco[ - 26.08.2015
Even it is outdated it should work properly with easy queries logically.
And i said i changed my plugin to strickenkid's. I used before very old version by blueg and it did the same.
Re: MySQL don't work sometimes -
CrazyChoco - 26.08.2015
By using an outdated plugin, you can't be guaranteed that it is compatible with 0.3.7. That's the only answer I can give you.