Topic_7_CIS423_PHP and MySQL
Topic_7_CIS423_PHP and MySQL
phpmyadmin
Type in your browser address bar
Localhost/phpmyadmin
Click database
Create database
Type the name of your database, in the create
new database.
library
book 5
Bid:numric (integer),
auto increment
Title:string(varchar)
Author:string(varchar)
PublisherId:numric(integer)
Price:numric(decimal) with
attribuate unsigned
1
java
John
Create a Relation
Select your database (library)
Click more and choose designer
Click create relation
Create a Relation
Select the referenced key
(primary key) in the one side.
Select the foreign key
Select your referential
integrity 1
2
3
Create a Relation
To delete the relation click
The link the many side.
To edit the relation select the
book table, structure then click
The relation view. 1
2
Export Database
Select export
Click custom then
select your database.
Click go
Import Database
Under localhost
Click import
Choose file
Click go.
Using mysql console
Open XAMPP control panel
Click shell
Type mysql –h localhost –u root
to create database type
Create database database_name;