Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- How can i create a database using PHP and MySQL?


httpwebwitch - 9:23 pm on Nov 26, 2011 (gmt 0)


it's true, typically you won't create a database using PHP. You'll create the database via direct access to MySQL, either with a control panel or directly from a command line interface.

Actually it's unusual to manipulate tables in PHP too; typically you'll define your table schema during app development, and in PHP you'll only be selecting, inserting, deleting and updating rows.

the command to create a database - when you're connected to it via command line or control panel - is "CREATE DATABASE ..."

Here's the syntax:
[dev.mysql.com...]

viva is correct - if you're working on a mission-critical app with a deadline, then you'll want to get an experienced programmer to do it right. SQL is a very *deep* topic with lots of little gotchas. But say you're doing this as a student to learn how it's done, then there are lots of great tutorials all over the www and excellent books you can read.

Good luck!


Thread source:: http://www.webmasterworld.com/php/4391234.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com