chokk Posted March 27, 2011 Share Posted March 27, 2011 How do you use more than one placeholder in prepared statements?Answer: $statement = $this->connect->prepare("INSERT INTO tablename (coloumn1, coloumn2) VALUES (?, ?)");$statement->bind_param("ss", $string1, $string2);$statement->execute();$statement->close(); Link to comment Share on other sites More sharing options...
boen_robot Posted March 27, 2011 Share Posted March 27, 2011 In the query, you just use more "?", and in PHP, you supply more that two arguments to mysqli_stmt::bind_param(). See examples on the page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.