Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My code is very simple:

 $con1 = new PDO("mysql:host=localhost;port=3306;dbname=users_db", root, "");
 $resp = $con1 -> query('SELECT * FROM records');

The response I get inside $resp is the query string 'SELECT * FROM records' no clue why. The same query is working using mysqli.

I tried debugging and I see a strange value {POD}[0] in $con1 after creating the PDO instance. What am I doing wrong here I followed this phpro.org.

share

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.