Download

C++ Node Mysql Query check.

Hello guys, im trying to make an node that perform Mysql Query.
What i have now is almost working, but only if i use the correct Query.

Database:
ae0d4a4801709583461ade43e75c58b8ca7654b1.png
8898ed6d5f95baf04d171feaf7a8e4d9337bdb43.png

If i use the query : “Select username from user where id = 2;” Works Great !, But if i use something like this “select username from user where id > 0” or wrong Query like this “select username fbbrom user whertte id > 0” the whole editor crashes.

6cc9f90e50b4765401c726d69505f11701e28e8f.png

Maybe this part of the code is wrong ?



state = mysql_query(connection,TCHAR_TO_ANSI(*Query));
if (state != 0) {
		//printf(mysql_error(connection));
		completed = false;
		message = mysql_error(connection);
	}

Here is my current code. http://pastebin.com/LMAqgUUd
Sorry for my bad english.