Feche1320 Posted March 12, 2012 Posted March 12, 2012 Any function/way to escape mysql letters such as : , - etc? www.host-ar.com.ar
drk Posted March 12, 2012 Posted March 12, 2012 https://wiki.multitheftauto.com/wiki/Mod ... ape_string This? EPT Team Server Development: 0% Learning C++ | C++ is amazing
Cadu12 Posted March 12, 2012 Posted March 12, 2012 What are you using? dbConnect or Modules MySQL? If dbConnect, there no need to do it. Ingame nick: Cadu12
Feche1320 Posted March 12, 2012 Author Posted March 12, 2012 I am using dbConnect, but I get an error when it wants to create a table with -, for example, race-dm-testmap gives me a MySQL warning and doesn't create it. www.host-ar.com.ar
Cadu12 Posted March 12, 2012 Posted March 12, 2012 Hmm, then use Modules Mysql for mysql_escape_string, you can use both. Ingame nick: Cadu12
Aibo Posted March 13, 2012 Posted March 13, 2012 I am using dbConnect, but I get an error when it wants to create a table with -, for example, race-dm-testmap gives me a MySQL warning and doesn't create it. post your query, maybe? ?
Feche1320 Posted March 14, 2012 Author Posted March 14, 2012 I figured it out that it's becouse I can't use - on table names, I just fixed it with :gsub("-", "\_"), altough it's not the same. www.host-ar.com.ar
UAEpro Posted March 14, 2012 Posted March 14, 2012 you can use what ever you want except dots by using this " ` " "INSERT INTO `"..safestring( mapname ).."` (................." function safestring( pro ) pro = string.gsub (pro, '%.', '-' ) return pro end تيم سبيك بروجيمر ts3server://ts.pg.sa
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now