pf » Multiple Statements with MySQL and JDBC
May 16, 2005
Multiple Statements with MySQL and JDBC
Cameron Childress pointed out the allowMultiQueries setting in the MySQL JDBC driver on the CFGURU list. It is set to false by default to protect you from SQL Injection attacks. When set to true MySQL will allow multiple SQL statements (seperated by a semi-colon) to be executed in a single CFQUERY tag. If you need to run multiple statements in a single CFQUERY, Dave Watts suggested creating another datasource with this setting turned on, which is only to be used when your running multiple statements.
But don't let this stop you from using prepared statements with CFQUERYPARAM, just because MySQL is safe by default - it is still a best practice, adds performance and type safety.
Permalink | Add Comment |
add to del.icio.us
| Tags: mysql, jdbc, cfguru, cfqueryparam, prepared statements, cfquery
add to del.icio.us
| Tags: mysql, jdbc, cfguru, cfqueryparam, prepared statements, cfquery
Related Entries
- Prepared Statements in PHP and MySQL - May 16, 2005
Trackback Address: 357/E720E80266099C317D5792CCF780EA2C
Spell Checker by Foundeo
- CFSCRIPT Cheatsheet
- 3 New Image Effects for ColdFusion 8
- Googlebot to Submit Web Forms
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks
- 10 Most Useful Image Functions in ColdFusion 8
- Speaking at NYC CFUG This Week
- Adobe AIR Tutorial for HTML / JavaScript Developers
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL
Subscribe to my RSS Feed:
RSS
RSS
Pete Freitag is a software engineer, and web developer located in










