PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT * FROM perks WHERE perkId=?, perkUid=?, perkUpic=?, perkText=?, perkDate=?, perkLikes=?
Copy Clear
Copy Format Clear
<?php $sql="SELECT * FROM perks WHERE perkId=?, perkUid=?, perkUpic=?, perkText=?, perkDate=?, perkLikes=?"; //get all comments from the comments table in the db, making fields placeholders $mysqli->prepare($sql); //Prepare the statement (protect from sql injection) $stmt = mysqli_stmt_init($mysqli); //create a prepared statement i.e. initialise if (!mysqli_stmt_prepare($stmt,$sql)) { //if the function above fails echo mysqli_error($conn); }
Show:  
Copy Clear