This is a discussion on Testing if a mysql table exists within the PHP Language forums, part of the PHP Programming Forums category; Is there a simple way to test if a mysql table exists? JUST One line !...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Fri, 17 Oct 2003 01:02:57 +0200, "sam" <rbaba99@caramail.com> wrote:
>Is there a simple way to test if a mysql table exists? >JUST One line ! Depends how many commands you put on one line. $res = mysql_query("show table status like '$tablename'") or die(mysql_error()); $table_exists = mysql_num_rows($res) == 1; -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |