php-sql-query-builder
php-sql-query-builder copied to clipboard
Information Request - Using MySqlBuilder with mysqli
Hi there,
When building a select() query with a where() and an equals() call, when I write the query it looks like "select * from user
where user
.id
= :var1". Am I able to change the ":var1" to the actual value I passed in? getValues() returns an empty array().
Thanks for your help!
Similar problem here. It would be nice to add support for mysqli
(question marks instead of labeled parameters).
Temporary BUT NOT RECOMMENDED solution is:
$stringQuery = $builder->write($q);
$stringQuery = preg_replace('/\:v\d+/', '?', $stringQuery);
yeah I agree it will be it would be nice to use question marks @evanirla @zuffik