PDOException thrown “SQLSTATE[HY093]: Invalid parameter”

General News 2 Comments »

Recently just had the ” PDOException thrown “SQLSTATE[HY093]: Invalid parameter” ” error.

This caused due to me having a query like this.

$dbq->prepare(’some query with :some vars in it like :this’)
$dbq->bindParam(:some, ’some string’);
$dbq->bindParam(:this, ‘another string’);
$dbq->bindParam(:oops, ‘this string is not in the prepared statement’);
$dbq->execute();

When i removed the :oops bind param it worked. Hope this helps someone else and saves time. PHP v 5.2, Mysql v5

Unable to contact Ebay, Amazon and Paypal

General News 2 Comments »
WP Theme & Icons by N.Design Studio & Shamefully P0wered by WordPress
Entries RSS Comments RSS Log in