Creating New Database with PHP script

software development


Is there a way to have a set of scripting create a new database?
I know I can make tables but have a project in mind where I would like to automate making databases for each client via a PHP website. Just a thought about how I would make something work. Not sure if I put this in the right area of the form. Thanks to anyone that responds.


There is not. Creating a large number of databases is typically not a very good idea; you will get much better results if you figure out a way to structure your project such that you can store all the data in a single set of tables (e.g, by storing a client ID in each row to tell them apart). Failing that, you could at least just create tables within that database for each client, rather than a whole new database for each one.


Thanks I’ll use tables, better that way now that I have it put in front of me. Just thinking about backing them up makes me make them all use the same tables to keep it simple. Just a stupid question, thanks for your answer.