Apostrophe problem in cf8 mysql
I am getting an error using cfqueryparam. I feel like this is the same way I used to use it in CF7. I have some data. It has a single quote apostrophe buried in it. And, it fails. So, this below is a simplified version. I am using CF 8, and mysql 5.x
Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fulltext, sectionid, catid) values ('test', 'This is great\'s info', 'another te' at line 1
The error occurred in /web/htdocs/abbott_stuff/joomla/moveDataIntoJoomla.cfm: line 75
73 : <!--- Insert a record into the joomla database --->
74 : <cfquery name="second" datasource="joomla">
75 : Insert into jos_content (title, alias, introtext, fulltext, sectionid, catid) values ('test', <cfqueryparam value="This is great's info" cfsqltype="cf_sql_varchar">, 'another test', 'test text', #first.joomlaSection#, #first.joomlaCategory#)
76 :
77 : <!--- Insert into jos_content (title,alias,introtext, fulltext, state, sectionid, mask, catid, created_by, created_by_alias, version) values (<cfqueryparam value="#first.title#" cfsqltype="cf_sql_varchar">, <cfqueryparam value="#safeTitle#" cfsqltype="cf_sql_varchar">, <cfqueryparam value="#first.description#" cfsqltype="cf_sql_varchar">, <cfqueryparam value="#first.content#">, 1, #first.joomlaSection#, 0, #first.joomlaCategory#, 0, <cfqueryparam value="#first.author#" cfsqltype="cf_sql_varchar">,1) --->
SQLSTATE 42000
SQL Insert into jos_content (title, alias, introtext, fulltext, sectionid, catid) values ('test', (param 1) , 'another test', 'test text', 10, 151)
VENDORERRORCODE 1064
DATASOURCE joomla
