[Phplib-users] Test whether db table exists using DB_SQL
Brought to you by:
nhruby,
richardarcher
From: Peter B. <re...@f2...> - 2001-08-15 08:06:01
|
Hi list, I need to test whether a table exists in the database, showing data from it if it does, and showing a button telling the user to "Create the table" if it doesn't. However, all SQL I've tried throws up the following error: Database error: Invalid SQL: select count(*) as count from sendcard_stats MySQL Error: 1146 (Table 'sendcarddb.sendcard_stats' doesn't exist) Session halted. There must be some way to do this... oh and did I say, it has to be cross-db compatible (work on as many of the db_xxx.inc drivers as possible) Please can someone tell me how to do this? Thanks, Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Peter's web page - Scottish narrow gauge in 009 http://members.aol.com/reywob/ --oOo-- |