Hey,
habe ein kleines Problem
Ich würde gerne per MySQL einen String abspeichern der aber Sachen wie " ' " enthalten kann. Bei mir spuckt es aber dauernd Fehler im MySQL Log aus, bspw. bei Sachen wie "Lil' Probe Inn".
Code
[20:00:34] [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 'Probe Inn')' at line 1
Zeile:
C
format(query, sizeof(query), "INSERT INTO `script_zones` (zoneID, zoneOwner, zoneTime, zoneColor, zoneminX, zoneminY, zonemaxX, zonemaxY, zoneName) VALUES ('%d', '%s', '%d', '%s', '%f', '%f', '%f', '%f', '%s')", i, "NO OWNER", gettime(), "0xFFFFFFAA", gSAZones[i][SAZONE_AREA][0], gSAZones[i][SAZONE_AREA][1], gSAZones[i][SAZONE_AREA][3], gSAZones[i][SAZONE_AREA][4], gSAZones[i][SAZONE_NAME]);