Phurien Posted February 16, 2003 Share Posted February 16, 2003 $docheck_i = mysql_db_query ($dbname,\"DESC table\",$dbconnect); if(!docheck_i){ //table does not }else{ //table does }; ------------------------------- That should work am i wrong, but it doesn\'t. I\'m trying to make an install script for my program, and i want it to check if a table exists and if it does it will say \"allready installed\" and if not it will bring you to the isntall page. What must be done here? Quote Link to comment https://forums.phpfreaks.com/topic/157-check-if-table-existsneed-help/ Share on other sites More sharing options...
effigy Posted February 16, 2003 Share Posted February 16, 2003 is your table named table or did you forget the $? Quote Link to comment https://forums.phpfreaks.com/topic/157-check-if-table-existsneed-help/#findComment-465 Share on other sites More sharing options...
metalblend Posted February 16, 2003 Share Posted February 16, 2003 Here\'s an easy way to do what you want.. http://www.oxyscripts.com/viewcode.php?id=12 I have a function similar to this one I\'ve made but it\'s a little more complicated than checking if a table exists. Hope that helps. Quote Link to comment https://forums.phpfreaks.com/topic/157-check-if-table-existsneed-help/#findComment-472 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.