nathanblogs Posted November 29, 2007 Share Posted November 29, 2007 Hey, I'm sure this has been answered a million times before but I couldn't find it after 30minutes of searching. Is there a query that will allow me to check whether a table exists within a database? Quote Link to comment https://forums.phpfreaks.com/topic/79347-solved-check-if-a-table-exists-in-a-database/ Share on other sites More sharing options...
toplay Posted November 29, 2007 Share Posted November 29, 2007 # Returns details about a table. MySQL will return error 1146 when table does not exist. describe put_table_name_here; # Returns table names found in DB. You can then look through the rows to find if a particular table exists (or not). show put_table_name_here; Quote Link to comment https://forums.phpfreaks.com/topic/79347-solved-check-if-a-table-exists-in-a-database/#findComment-401789 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.