MYSQLi bind_result is returning null

前端 未结 1 1997
轮回少年
轮回少年 2020-12-21 06:28

I am trying to output the variables that I get from the database in my query but nothing is being returned. Using MYSQLi prepared statements.

Please see code below:

1条回答
  •  醉梦人生
    2020-12-21 06:55

    you forgetting the line to fetch the result. fetch() .

    try that:

      $stmt->bind_result($first_name, $last_name);
      $stmt->fetch();  // ----- > you forget that line to fetch results.
      $stmt->close();
    

    0 讨论(0)
提交回复
热议问题