Skip to content

Commit 21b591a

Browse files
authored
remove legacy >where("firstname", Array ('LIKE' => '%John%')) support (#854)
1 parent 8e7abbe commit 21b591a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

MysqliDb.php

-6
Original file line numberDiff line numberDiff line change
@@ -968,12 +968,6 @@ public function delete($tableName, $numRows = null)
968968
*/
969969
public function where($whereProp, $whereValue = 'DBNULL', $operator = '=', $cond = 'AND')
970970
{
971-
// forkaround for an old operation api
972-
if (is_array($whereValue) && ($key = key($whereValue)) != "0") {
973-
$operator = $key;
974-
$whereValue = $whereValue[$key];
975-
}
976-
977971
if (count($this->_where) == 0) {
978972
$cond = '';
979973
}

tests/mysqliDbTests.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function createTable ($name, $data) {
251251
//$users = $db->get("users");
252252
//print_r ($users);
253253

254-
$db->where("firstname", Array ('LIKE' => '%John%'));
254+
$db->where("firstname", '%John%', 'like');
255255
$users = $db->get("users");
256256
if ($db->count != 1) {
257257
echo "Invalid insert count in LIKE: ".$db->count;

0 commit comments

Comments
 (0)