tags:

views:

24

answers:

1

I am having a strange problem. I am using PDO prepared statement.

I have two tables with the name of TABLE1 AND TABLE2. 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?

A: 

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!

Ghost