I know the command is DROP TABLE IF EXISTS [table name], but how do I use it in PHP?
I've successfully connected to the MySQL server, but when I put that line in the PHP script, I get an error.
| SitePoint Sponsor |




I know the command is DROP TABLE IF EXISTS [table name], but how do I use it in PHP?
I've successfully connected to the MySQL server, but when I put that line in the PHP script, I get an error.
Seen as you have already connected to the database you just need to run a query on it:
$res = mysql_query( 'DROP TABLE IF EXISTS name' );
Karl Austin :: Profile :: KDA Web Services Ltd.
Business Web Hosting :: Managed Dedicated Hosting :: From £250/m
Personal Web Hosting :: Budget Web Hosting :: From £50/y
Call 0800 542 9764 today and ask about our Cloud Hosting Platform




Thank you! sorted now.
Bookmarks