Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $statement = $db->prepare("SELECT answer FROM question WHERE question = :question");
- $statement->execute(array(':question' => $question));
- $row = $statement->fetch();
- $answer = $row['answer']; // this gives me a number
- $statement = $db->prepare("SELECT * FROM question WHERE question = :question");
- $statement->execute(array(':question' => $question));
- $row = $statement->fetch();
- $answer = $row['answer'];
- $other = $row[$answer + 1];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement