Using wildcards in prepared statement - MySQLi

后端 未结 5 828
无人及你
无人及你 2020-11-27 23:14

I\'m trying to run the following query, and I\'m having trouble with the wildcard.

   function getStudents() {
        global $db;
        $users = array();
         


        
5条回答
  •  自闭症患者
    2020-11-27 23:51

    It is the same reason that happens in C++. When you pass a value to a function which expects the argument to be a reference, you need a variable ( not temporary ). So first create a variable and then pass it.

提交回复
热议问题