Jump to content

mysql syntax error donno how to fix


Recommended Posts

So like this?

  
local queryResult = mysql_query(mysqlHandler,"INSERT INTO housingdata(name, address, type, interior, intlock, owner, price, value, income, status, x, y, z, csX, csY, csZ, csrX, csrY, csrZ) VALUES("..name..","..address..","..typeint..",0,'0','LGC Housing Team',"..tonumber(price)..","..tonumber(price)..","..tonumber(income)..","..tonumber(status)..","..tonumber(x)..","..tonumber(y)..","..tonumber(z)..",".. tonumber(csx)..",".. tonumber(csy)..","..tonumber(csz)..","..tonumber(csrx)..","..tonumber(csry)..","..tonumber(csrz)..")") 
             
  

EDIT: That didnt work either, its taking the values as collumn names?

Link to comment
  • MTA Team
mysql_query(mysqlHandler,"INSERT INTO housingdata(`name`, `address`, `type`, `interior`, `intlock`, `owner`, `price`, `value`, `income`, `status`, `x`, `y`, `z`, `csX`, `csY`, `csZ`, `csrX`, `csrY`, `csrZ`) .... ) 
 

I suspect that one of your column names is a MySQL keyword and makes the query fail. Try that.

Link to comment

Like this? Cause this didnt work either , got the error : "Unkown Collumn test in field table", and test is the value i put in for 'name'

  
local queryResult = mysql_query(mysqlHandler,"INSERT INTO housingdata(`name`, `address`, `type`, `interior`, `intlock`, `owner`, `price`, `value`, `income`, `status`, `x`, `y`, `z`, `csX`, `csY`, `csZ`, `csrX`, `csrY`, `csrZ`) VALUES("..name..","..address..","..typeint..",0,'0','LGC Housing Team',"..tonumber(price)..","..tonumber(price)..","..tonumber(income)..","..tonumber(status)..","..tonumber(x)..","..tonumber(y)..","..tonumber(z)..",".. tonumber(csx)..",".. tonumber(csy)..","..tonumber(csz)..","..tonumber(csrx)..","..tonumber(csry)..","..tonumber(csrz)..")") 
             
  

Link to comment

Now im getting another error,

  
local queryResult = mysql_query(mysqlHandler,"INSERT INTO housingdata(id ,name, address, type, interior, owner, price, value, income, status, x, y, z, csX, csY, csZ, csrX, csrY, csrZ) VALUES("..id..","..name.."','"..address..","..typeint..","..interior..",'LGC Housing Team',"..tonumber(price)..","..tonumber(price)..","..tonumber(income)..","..tonumber(status)..","..tonumber(x)..","..tonumber(y)..","..tonumber(z)..",".. tonumber(csx)..",".. tonumber(csy)..","..tonumber(csz)..","..tonumber(csrx)..","..tonumber(csry)..","..tonumber(csrz)..")") 
  

Doesnt use the first value i give it, instead it ignores itand gives me error.

Link to comment

The problem remains, module or not, the syntax of that function isn't the same as in dbConnect, currently MySql support are built in so there is no point of using that kind of modules. BTW it's not completely unlike that the module is written in php after all. I would still recommend dbConnect for this.

Link to comment

Haha, when you cant even get leaked scripts to work damien i doubt there is any chance for your RPG.

Good luck tho. And guess someone can lock this topic as this is a stolen resource from WSS:RPG. I can provide proof if needed.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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