in reply to Re^2: DBI: checking if a table exists in a cross-DB manner?
in thread DBI: checking if a table exists in a cross-DB manner?

Let's see what we can do. What about "select * from $table_name where 9=0"? For most db drivers that I know, that will either fail in the prepare or the execute if the table doesn't exist. You should be able to trap that error and act accordingly. Moreover, it won't actually fetch any data, so it's good from a data throughput standpoint. :)

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re^3: DBI: checking if a table exists in a cross-DB manner?