Closed devhalfdog closed 7 years ago
hi.
My Source
in dbtest.php
$where = "'no[<]' = 1"; $dbTest = new Medoo\Medoo([ 'database_type' => 'mysql', 'database_name' => 'tester', 'server' => 'localhost', 'username' => 'test', 'password' => 'test', 'logging' => true ]); $dbTest->select('test', [ 'name' ], [ $where ]);
output Logging
array(1) { [0]=> string(55) "SELECT "name" FROM "test1" WHERE "0" = '\'no[>]\' => 1'" }
Why does the 'WHERE' section contain a $ where variable that will print 'WHERE "0" ...' in the output.
Your $where is an array with string 'no[<]' = 1 only. Check out the basic PHP array syntax.
'no[<]' = 1
$where = [ 'no[<]' => 1 ]; $dbTest->select('test', [ 'name' ], $where);
hi.
My Source
in dbtest.php
output Logging
Why does the 'WHERE' section contain a $ where variable that will print 'WHERE "0" ...' in the output.