prepare($sql); if( ! is_like_array($query)) { $this->get_last_error(); return FALSE; } // Set the statement in the class variable for easy later access $this->statement =& $query; if( ! is_like_array($data)) { trigger_error("Invalid data argument"); return FALSE; } // Bind the parameters foreach($data as $k => $value) { $res = $query->bindValue($k, $value); if( ! $res) { trigger_error("Parameter not successfully bound"); return FALSE; } } return $query; } } // End of db_pdo.php