PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

Query with "?" sign - no placeholder - auto interpreter as placeholder

Open KTP95 opened this issue 5 years ago • 0 comments

$query = "SELECT REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(referrer, '/', 3), '://', -1), '/', 1), ?, 1), 'www.','') AS domain,count(*) as counter FROM referrers GROUP BY domain ";
$referrers = $db->rawQuery($query, ['?']); 
echo $db->getLastQuery();

without $referrers = $db->rawQuery($query, ['?']); the sign ? in auto-interpreter as placeholder, but they isn't and create notice in php and alteration in query.

I know that this isn't a very bug, but a little nuisance,

I just wanted to report.

ps. this Lib this fantastic.... thanks, i use it from some years and never wanna change.

KTP95 avatar Apr 05 '20 19:04 KTP95