[C#] MySQL Syntax Problem
Hello,
Well I am nothing but a beginner in C# and I am enjoying my experience so far but I have hit a cross-road with a piece of code.
When I attempt to use this it gives me an error if you can help I will be so grateful.
Code:
dbClient.runQuery("INSERT INTO rooms(name, description, state) VALUES('" + uaroom + "', '" + uadesc + "', '" + uadoor + "' WHERE id = '" + roomID + "')");
Re: [C#] MySQL Syntax Problem
could u pls post the error.
would be much easier.
maybe some lines around the error too.
Re: [C#] MySQL Syntax Problem
Re: [C#] MySQL Syntax Problem
Closing parenthesis missing right before where.
And this is a MySQL problem, it has nothing to do with C# whatsoever.
EDIT: My bad where not values
Re: [C#] MySQL Syntax Problem
I know your using Holograph, (Habbo Server). Why don't you post these in the original section, there are people willing to help.
Check if that's the right table name, or if that table exists in the database.
Re: [C#] MySQL Syntax Problem
Code:
dbClient.runQuery("INSERT INTO rooms(name, description, state) VALUES('" + uaroom + "', '" + uadesc + "', '" + uadoor + "') WHERE id = '" + roomID + "'");
Re: [C#] MySQL Syntax Problem
Quote:
Originally Posted by
Way[2]Death
Code:
dbClient.runQuery("INSERT INTO rooms(name, description, state) VALUES('" + uaroom + "', '" + uadesc + "', '" + uadoor + "') WHERE id = '" + roomID + "'");
It is still chucking the same error out.
Re: [C#] MySQL Syntax Problem
Well, the only thing left really, is the variables. If you have enough knowledge in C# search for the variables and see if they are correct. You can post a thread in the help section, there maybe someone who can see the error.
Re: [C#] MySQL Syntax Problem
Can't you just put the query in some variable and display it ?
Re: [C#] MySQL Syntax Problem
dudes, common sence please, you guys are INSERTing something and read the last line...
INSERT INTO /table/ /stuff/ WHERE /where/
insert+where isnt the best thing eh
Code:
dbClient.runQuery("INSERT INTO rooms(name, description, state) VALUES('" + uaroom + "', '" + uadesc + "', '" + uadoor + "')");
Im todays winner?