Medoo PHP Database Framework



Composer Installer:

Project Structure:

index.php
<?php require 'vendor/autoload.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Database Apps</title>
</head>
<body>
<?php 
$database = new medoo([
    'database_type' => 'mysql',
    'database_name' => 'db_utility',
    'server' => 'localhost',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8'
]);
$database->insert('mi_installer', [
    'username' => 'rampukar',
    'userpass' => 'developer',
]);
 ?>
</body>
</html>

SQL
CREATE TABLE `mi_installer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT NULL,
  `userpass` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

Demo:

Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment