I am looking for sample database script to create tables. The script must create password for the user, data for each user store in different section.
I am looking for sample database script to create tables. The script must create password for the user, data for each user store in different section.
To create a MySQL table you need to open the phpMyAdmin tool for the coresponding database. Before you can enter data (rows) into a table, you must first define what kinds of data will be stored (columns). The columns specify what the data is going to be, while the rows contain the actual data.Once the new table is created you can specify the fields' names, length, collation, attributes, etc.
Sample database script to create tables :
Code:<?php // First create sol connection mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); mysql_query("CREATE TABLE example( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), empname VARCHAR(30), empage INT)") or die(mysql_error()); echo "Table is Created!"; ?>
You create the database tables and fields by using PHPMagic software, this software generates all the code for you. Simply upload the generated code to your server and run the generated setup file in your browser or you can also use Optimization Advisor wizard, it provides an SQL script to create the recommended summary tables.
Bookmarks