Enhanced placeholder/argument check algorithm
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
# AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com
|
||||
# VERSION: 0.0.4
|
||||
# CREATED: 2015-07-11 15:53:01
|
||||
# REVISION: 2025-05-06 21:12:08
|
||||
# REVISION: 2025-05-07 17:20:00
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -136,8 +136,10 @@ else {
|
||||
_debug( $DEBUG >= 3, '$query: ' . Dumper(\$query) );
|
||||
|
||||
#
|
||||
# Count placeholders in the query and the arguments provided
|
||||
# Count placeholders in the query and the arguments provided. First remove all
|
||||
# comments which may contain '?' characters, then count any that are left.
|
||||
#
|
||||
$query = join("\n", grep {!/^--/} split( "\n", $query ) );
|
||||
$pcount = grep {/\?/} split( '', $query );
|
||||
$acount = scalar(@dbargs);
|
||||
|
||||
|
Reference in New Issue
Block a user