0

How to bind an array to an IN() condition in php prepared statements?

  • What is the value of `print_r($userid_array)`; – Saty Jun 24 '16 at 06:57
  • `$stmt = mysqli_prepare($con, "SELECT aboutme FROM members WHERE user_id IN (?)"; $userid_array = implode("','", $userid_array); mysqli_stmt_bind_param($stmt, 'i', $userid_array); ` – Alive to die - Anant Jun 24 '16 at 06:59
  • 1
    This is a question that comes up weekly. Instead of copy'n'pasting one of the ad-hoc snippets, consider using an established query frontend (as this is a long solved problem). – mario Jun 24 '16 at 07:01
  • the value of print_r($userid_array) is 61,62,63 – user3671322 Jun 24 '16 at 07:02

0 Answers0