Little problem in MySQL -
Kraeror - 26.04.2018
Hello guys. As I said I have a little problem with MySQL.
It doesn't work:
PHP код:
mysql_format(zMySQL, query2, sizeof(query2), "UPDATE `vehicles` SET `Vehicle_Locked_For` = '%d' WHERE `Veh:X` = '%f' AND `Veh:Y` = '%f' AND `Veh:Z` = '%f' AND `Veh:A` = '%f'", //2996 line
VehicleData[vehicleid][VehOwner], VehicleData[vehicleid][vSpawnX], VehicleData[vehicleid][vSpawnY], VehicleData[vehicleid][vSpawnZ], VehicleData[vehicleid][vSpawnA]); //2997 line
mysql_tquery(zMySQL, query2);
And pawno compiler says:
Quote:
(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch
|
Re: Little problem in MySQL -
Kraeror - 26.04.2018
Anybody can help me for this warnings?
Re: Little problem in MySQL -
kovac - 26.04.2018
You don't really need mysql_tquery for a single query, use mysql_query instead
Re: Little problem in MySQL -
Logic_ - 26.04.2018
Please do not help if you don't know what you are doing!
Please tell us about your MySQL plugin version. And I'm sure that your mysql_format line has wrong parameters. Furthermore, show us some more code of that area.
Re: Little problem in MySQL -
Phreak - 26.04.2018
Do the values match the placeholders? (is VehOwner an integer, vSpawnX a float... etc?)
Re: Little problem in MySQL -
Deekaay - 26.04.2018
Quote:
Originally Posted by Kraeror
Hello guys. As I said I have a little problem with MySQL.
It doesn't work:
PHP код:
mysql_format(zMySQL, query2, sizeof(query2), "UPDATE `vehicles` SET `Vehicle_Locked_For` = '%d' WHERE `Veh:X` = '%f' AND `Veh:Y` = '%f' AND `Veh:Z` = '%f' AND `Veh:A` = '%f'", //2996 line
VehicleData[vehicleid][VehOwner], VehicleData[vehicleid][vSpawnX], VehicleData[vehicleid][vSpawnY], VehicleData[vehicleid][vSpawnZ], VehicleData[vehicleid][vSpawnA]); //2997 line
mysql_tquery(zMySQL, query2);
And pawno compiler says:
|
I see you're using %d for VehicleData[vehicleid][VehOwner]
Are you sure VehOwner isn't a string? Try using %e instead.
Re: Little problem in MySQL -
xMoBi - 26.04.2018
Above poster : That will not cause any compile errors, there is other problem here
Re: Little problem in MySQL -
xMoBi - 26.04.2018
And plz read this
Quote:
Originally Posted by Logic_
Please do not help if you don't know what you are doing!
|
Re: Little problem in MySQL -
d3ll - 26.04.2018
Have you made sure that the connection handler has the prefix 'MySQL:'
so
Re: Little problem in MySQL -
Deekaay - 26.04.2018
Quote:
Originally Posted by xMoBi
Above poster : That will not cause any compile errors, there is other problem here
|
That won’t cause an error but a tag mismatch. There aren’t compile errors as I can see from his post.
I’ve also noticed there are 4 warnings for tag mismatches, which leads me to think that the %d isn’t the problem but the floats that aren’t defined as floats from the beginning ( VehicleData[vehicleid][vSpawnX] ecc. )