Trying to make a prepare statement but for some reason it fails me and i'm getting errno 0 with error (text) being blank. What is causing this? Have been searching the web for a quite while now.
<?php
$dbh = new mysqli("localhost","root","","honeypot");
if ($dbh->connect_errno) {
echo "Connection failed: (" . $dbh->connect_errno . ") " . $dbh->connect_error;
die();
}
//Prepare
if (!($stmt = $dbh->prepare("SELECT tblUsers WHERE UserName = ?"))) {
echo "Prepare failed: (" . $dbh->connect_errno . ") " . $dbh->connect_error;
}
?>