PHP OOP issue with database

前端 未结 3 1956
清歌不尽
清歌不尽 2021-01-26 17:43

I am querying usernames from database using the get() function in the DB class.. its always returning \'No users\' even if there are users existing in the database.. here is my

3条回答
  •  半阙折子戏
    2021-01-26 18:13

    Try changing

    $sql = "{$action} FROM {$table} WHERE {$field} {$operator} ?";
    

    to

    $sql = "{$action} FROM {$table} WHERE {$field} {$operator} {$value}";
    

提交回复
热议问题