Feche1320 Posted March 12, 2012 Share Posted March 12, 2012 Any function/way to escape mysql letters such as : , - etc? Link to comment
drk Posted March 12, 2012 Share Posted March 12, 2012 https://wiki.multitheftauto.com/wiki/Mod ... ape_string This? Link to comment
Cadu12 Posted March 12, 2012 Share Posted March 12, 2012 What are you using? dbConnect or Modules MySQL? If dbConnect, there no need to do it. Link to comment
Feche1320 Posted March 12, 2012 Author Share 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. Link to comment
Cadu12 Posted March 12, 2012 Share Posted March 12, 2012 Hmm, then use Modules Mysql for mysql_escape_string, you can use both. Link to comment
Aibo Posted March 13, 2012 Share 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? Link to comment
Feche1320 Posted March 14, 2012 Author Share 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. Link to comment
UAEpro Posted March 14, 2012 Share 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 Link to comment
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