INSERT INTO bugged with float - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: INSERT INTO bugged with float (
/showthread.php?tid=146219)
INSERT INTO bugged with float -
Martin_M - 06.05.2010
Hey everybody.
I'm using this one MySQL plugin -->
http://forum.sa-mp.com/index.php?topic=79352.0
Here's my code:
Код:
new Float:Pozicija[3];
bInfo[sInfo[KiekBendroviu]][bPavadinimas] = Pavadinimas;
bInfo[sInfo[KiekBendroviu]][Vadybininkas] = Zaidejas;
GetPlayerPos(playerid,Pozicija[0],Pozicija[1],Pozicija[2]);
bInfo[sInfo[KiekBendroviu]][bX] = Pozicija[0];
bInfo[sInfo[KiekBendroviu]][bY] = Pozicija[1];
bInfo[sInfo[KiekBendroviu]][bZ] = Pozicija[2];
bInfo[sInfo[KiekBendroviu]][Darbuotojai] = 1;
sInfo[BendrovesTelefonoNumeris]++;
bInfo[sInfo[KiekBendroviu]][bNumeris] = sInfo[BendrovesTelefonoNumeris];
mysql_real_escape_string(Pavadinimas,Pavadinimas);
format(query,1024,"INSERT INTO bendroves (BendrovesID,bPavadinimas,Vadybininkas) VALUES('%d','%s','%s')",sInfo[KiekBendroviu],bInfo[sInfo[KiekBendroviu]][bPavadinimas],bInfo[sInfo[KiekBendroviu]][Vadybininkas]);
mysql_query(query);
Everything's work, till i insert Float's. Then, it's not inserted to the table.
Where the problem?
Thanks for help.
Re: INSERT INTO bugged with float -
Killa_ - 06.05.2010
%f for float
Re: INSERT INTO bugged with float -
Martin_M - 06.05.2010
Quote:
Originally Posted by Killa_
%f for float
|
I know that. It's won't work.
Re: INSERT INTO bugged with float -
Jay_ - 06.05.2010
Because you're not using %f. Look again.
Re: INSERT INTO bugged with float -
Martin_M - 06.05.2010
Quote:
Originally Posted by _Jay_
Because you're not using %f. Look again.
|
In this script no. But before that i have used.
( i deleted that, because i need to test this without position )