Compare Hotel Quotes & Get Suggestions, Book Hotel

Compare Tour Quotes & Get Suggestions

Create your own search engine with PHP and MySQL

Database Matter The first step is to open up phpMyAdmin or a database software and incorporate the below query into the SQL section. 1 2 3 4 5 6 CREATE TABLE `searchengine` ( `id` INT NOT NULL AUTO_INCREMENT , `pageurl` VARCHAR( 255 ) NOT NULL , `pagecontent` TEXT NOT NULL , PRIMARY KEY ( `id` … Read more

Insert Data From a Form Into a Database

iNet Expert Technology

Now we will create an HTML form that can be used to add new records to the “Persons” table. Here is the HTML form: <html> <body> <form action=”insert.php” method=”post”> Firstname: <input type=”text” name=”firstname”> Lastname: <input type=”text” name=”lastname”> Age: <input type=”text” name=”age”> <input type=”submit”> </form> </body> </html> When a user clicks the submit button in the … Read more

SQL FOREIGN KEY Constraint

CREATE TABLE product ( category INT NOT NULL, id INT NOT NULL, price DECIMAL, PRIMARY KEY(category, id) ) ENGINE=INNODB; CREATE TABLE customer ( id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE product_order ( no INT NOT NULL AUTO_INCREMENT, product_category INT NOT NULL, product_id INT NOT NULL, customer_id INT NOT NULL, PRIMARY KEY(no), … Read more

Creating a table with auto_increment

CREATE TABLE example_autoincrement ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100) ); CREATE TABLE example_innodb ( id INT, data VARCHAR(100) ) TYPE=innodb;