shirvo Posted February 17, 2007 Share Posted February 17, 2007 How with php can i look to see if a database has been created. and how do i create a database with php? How can i have php check if there is a table with the fields i want there to be in it. and if there not there to create them. i know how to create them i just need to find out if there there. Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted February 17, 2007 Share Posted February 17, 2007 well im not sure if i am understanding what you are asking but if the database does not exsist you will get an error telling you that it does not exsist when you run the script. Also these are all sql problems and not php issues. php parses the sql and stores the results into varablies. It sounds like you are looking for the sql statements to accomplish said tasks. also are you using or have you heard of phpmyadmin? if not you might want to look into it it can handle all of you databases alot faster and more efficient than writing a php script to do it. also it is a great way to learn the mysql statements you need to know since when you do something it shows you the sql statment it used to accomplish it. if this is not what you ment then try providing some more info like examples of what you are trying to do. Quote Link to comment 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.