[英]create database from web application in mysql database using admin panel in php
Here, Is my requirement : 在这里,是我的要求:
My requirement is I have to creating table not using mysql database but using own custom UI 我的要求是我必须不使用mysql数据库创建表,而是使用自己的自定义UI
All the thing I have to do with admin panel. 我要做的所有事情与管理面板有关。
Please can you give me some idea.How can I do that, 请您给我一些想法。我该怎么做,
Thanks for your support. 谢谢你的支持。
You can have your custom UI to read all the information you need from the user. 您可以使用自定义UI来从用户读取所需的所有信息。 Then use the MySQL statement
DDL
to apply these information and create them into the database. 然后使用MySQL语句
DDL
来应用这些信息并将其创建到数据库中。 You have all what you need, as following: 您拥有所需的一切,如下所示:
Create database from web application in database
从数据库中的Web应用程序创建数据库
You can use the CREATE DATABASE
command to create the database in the mysql connection that you have. 您可以使用
CREATE DATABASE
命令在您拥有的mysql连接中创建数据库。
After creating database can create number of tables with fields.
创建数据库后可以创建带有字段的表数。
Then the user selects the predefined databases, then after the user inputs the table name, columns' names and data types. 然后,用户选择预定义的数据库,然后在用户输入表名称,列的名称和数据类型之后。 You can use the
CREATE TABLE
command to create the table with the information you get from the user. 您可以使用
CREATE TABLE
命令使用从用户那里获得的信息来创建表。
Listing of created database and it's tables.
列出已创建的数据库及其表。
Use SHOW Databases
to list the created databases. 使用
SHOW Databases
列出创建的数据库。 Also SHOW TABLES
to list the tables. 还
SHOW TABLES
以列出表。
To get the list of tables under a specific database, you can use
要获取特定数据库下的表列表,可以使用
infomration_schema
like this: infomration_schema
像这样:
SELECT TABLE_NAME
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'database name';
Can modify the fields with type and size.
可以修改类型和大小的字段。
You can use ALTER TABLE
to modify the types and sizes. 您可以使用
ALTER TABLE
来修改类型和大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.