15.09.2017, 10:24
Can you fiind what's wrong with this?
I always seem to get this error:
Код:
new save_query[2500], string[512]; strcat(save_query, "INSERT INTO `server_interiors` (`sInteriorName`, `sEnterPosX`, `sEnterPosY`, `sEnterPosZ`, `sExitPosX`, `sExitPosY`, `sExitPosZ`, `sEnterInterior`, `sExitInterior`, `sEnterVirtualWorld`, `sExitVirtualWorld`, `sInteriorExists`) "); strcat(save_query, " VALUES ( "); format(string, sizeof(string), "'%s',", S_Interiors[interiorid][sInteriorName]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sEnterPosX]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sEnterPosY]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sEnterPosZ]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sExitPosX]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sExitPosY]); strcat(save_query, string); format(string, sizeof(string), "'%f',", S_Interiors[interiorid][sExitPosZ]); strcat(save_query, string); format(string, sizeof(string), "'%d',", S_Interiors[interiorid][sEnterInterior]); strcat(save_query, string); format(string, sizeof(string), "'%d',", S_Interiors[interiorid][sExitInterior]); strcat(save_query, string); format(string, sizeof(string), "`%d',", S_Interiors[interiorid][sEnterVirtualWorld]); strcat(save_query, string); format(string, sizeof(string), "'%d',", S_Interiors[interiorid][sExitVirtualWorld]); strcat(save_query, string); format(string, sizeof(string), "'%d' )", S_Interiors[interiorid][sInteriorExists]); strcat(save_query, string); mysql_format(MySQL_Handle, save_query, sizeof(save_query), save_query); mysql_query(MySQL_Handle, save_query);
Код:
[13:17:56] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1