I know the PHP command "CREATE DATABASE DataBaseName" creates a database in MySQL. I also know that the command "CREATE TABLE TableName" creates a table. But how is the CREATE TABLE command linked to the DATABASE in MySQL, I mean what if there are multiple databases, then in which database would the table be created, how is the table linked to the database?
MySQL: How do i know what table and database my php code is work with?
Collapse
X
-
I know the PHP command "CREATE DATABASE DataBaseName" creates a database in MySQL.
I mean what if there are multiple databases, then in which database would the table be created -
It's vary rare and IMO silly to use your own custom php script to create the database. Normally you would use a tool specifically designed for this purpose. The most common one talked about in forums like this is phpMyAdmin which is a 3rd party php app for the administration of mysql. I on the other hand prefer to use Mysql Workbench.Comment
Comment