Fix minor errors so that the code actually runs.

Unfortunately, it appears that the member function `msqli_stmt::get_result()` only exists for a particular MySQL driver. I'll switch to PDO for prepared statements.