pdo mysql select statement working on one table while it is not working on other
I am having a strange problem. I am using PDO prepared statement.
I have two tables with the name of TABLE1 AND TABL开发者_如何学PythonE2. TABLE1 is copied from another db with its data. TABLE2 is created using phpmyAdmin, Both Tables are in the same Database.
I am running a Select statement using PDO prepare and its working fine on TABLE1 (which is copied from another DB) while it is not working on TABLE2 (which is created using phpmyadmin). No error and No exception. Strange?
does PDO prepare statement requires any specific type of table? or another setting which i don't know?
I find the solution myself. actually pdo requires fully qualified name to access table which was created using phpmyadmin.
so run the select statement using Following queries.
SELECT * FROM DB1.TABLE2 (successfully return the result set)
While I can access my Copied table (TABLE1) from another database without using DB1.
SELECT * FROM TABLE1 (successfully return the result set)
Cheers!
精彩评论