kuwalda Posted July 13, 2014 Share Posted July 13, 2014 I have query which looks like this: local update = mysql_query(handler,"UPDATE cars SET engine = '"..upgrade.."' WHERE car_model = '"..getElementModel(getPedOccupiedVehicle(thePlayer)).."' and car_numberplate= '"..getVehiclePlateText(getPedOccupiedVehicle(thePlayer)).."' and car_owner = '"..getPlayerName(thePlayer).."';") Focus here is on SET engine = '"..upgrade.."', because it works fine like this, but when I try to set variable instead of engine, it stops working. Why? Tried like this: mysql_query(handler,"UPDATE cars SET '"..upgradojamais.."' = '"..upgrade.."' ... and like this: mysql_query(handler,"UPDATE cars SET '"..tostring(upgradojamais).."' = '"..upgrade.."' ... ,but none of them worked? Why? Variable "upgradojamais" is fine, I already checked on that. It is getting passed with function (second variable) setCarDBdata(source, "engine", upgrade) Link to comment
MTA Team botder Posted July 13, 2014 MTA Team Share Posted July 13, 2014 Use ` and not ' for the column (e. g. engine) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now