Jump to content

Database help


shirvo

Recommended Posts

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.

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.