I have set up a basic "guestbook" script. It uses a table named guestbook and currently has two rows in it. Using the mysql_* commands I can successfully access the table and display the information as desired. However, I'm trying to look into PDO and currently am attempting to convert the code to PDO. I'm having a bizarre error, though.
The code always echo's "Whoops" as apparently, the query() command fails to retrieve any data. When I do var_dump($data), the output is bool(false). I've tried searching the Internet but found no satisfactory solutions. I know for a fact that there are two rows of data in the table guestbook, yet query() is failing to retrieve them. Can anyone help me understand what's wrong? Does Boru not have part or all of PDO enabled?
// Connect to the database.
// Grab the data.
$select="SELECT * FROM guestbook";
echo "Good so far";
(And before anyone says anything, I realize there are such thing as prepared statements. I'm just starting with PDO, cut me some slack. ;) )