Posts

Showing posts with the label Accessing

Accessing Data in MySQL Database Using PHP

PHP and MySQL are two components that are almost always present in every web-based program. Data-driven Web applications can use the MySQL which has the main advantages of open source applications. In each database in MySQL there are a few tables. To learn how to access the data contained in the MySQL database, create a database instance with the name “online-store” . Databases can be created using the SQL command “create database online-store” or using PHPMyadmin . Later in the database table named instance make an “employee” table with the columns in it is the “id”, “first-name”, “last-name”, “address” . You can create table “employee” using SQL command as follows: CREATE TABLE IF NOT EXISTS `employee` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first-name` varchar(50) NOT NULL, `last-name` varchar(50) NOT NULL, `address` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHAR...