SA-MP Forums Archive
SQL Query - 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: SQL Query (/showthread.php?tid=640854)



SQL Query - Puff - 08.09.2017

Код:
format(query, sizeof(query), "UPDATE `safes` SET `X` = %f, `Y` = %f, `Z` = %f, `Angle` = %f WHERE `id` = %d",x,y,z,rz,FamilySafes[safeid][ESafeSQLID]);
Is there any other way I can call this query? cause this doesn't seems to be working..


Q2: Aaand can you convert SQL to INI?


Re: SQL Query - 10MIN - 08.09.2017

You shouldn't try to convert SQL to INI... Never... Because the .ini files are written and readed by the SAMP server itself, and the DBMS (SQLite) are also written by the server itself, but there are some differences... Also the RDBMS (MySQL / MariaDB / Postgre) are using a server for the database itself so the query is processed by the database server and not your server.


Re: SQL Query - Sew_Sumi - 08.09.2017

Better to use SQL than INI.

Not because of the 'reasons' listed above, but because SQL should be faster, and a lot more reliable than ini files.


Re: SQL Query - Kane - 08.09.2017

Maybe if you tell us what the problem is we could help you. SQL to INI is a downgrade.


Re: SQL Query - Zeth - 08.09.2017

Just try to fix it but never think of going a step back[Mysql to INI] because later when you will come to know the advantages of sql, you would try to get back into sql


Re: SQL Query - Puff - 08.09.2017

Thank you all for the support though, I fixed the issue


Re: SQL Query - Sew_Sumi - 08.09.2017

Should let others know how you fixed it, and why you fixed it in that way.

Could help someone in the future, who wonders if they should go through with SQL, or choose INIs.


Re: SQL Query - thegamer355 - 08.09.2017

I don't see code where you're executing the query, this is done using mysql_query