Jump to content

mysql UPDATE weird problem


kuwalda

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...