on-internet
← Community

Non-Object Errors using PHP PDO with MySQL [duplicate]

Stack Overflow ·

I've been scratching my head over this for a few days now and I've still got nowhere. I'm trying to pull a small set of values from a MySQL database via PHP PDO; I know PDO works as I am using it else where and I have based my code around te previously working code. function custom_sub_cat_list($db_details, $cat_id) { //ln21 $subcat = NULL; try { $h = new PDO("mysql:host=".$db_details['host'].";dbase=".$db_details['db'],$db_details['user'],$db_details['pass']); $h->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); } catch(PDOException $ex) { return false; } try { $q = $h->prepare("SELECT catego

Comments

Sign in or sign up to comment and upvote.

No comments yet.