GithubHelp home page GithubHelp logo

basemax / phpedb Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 3.0 45 KB

PHP Easy DB (Database) is an easy library to manage and control the database.

License: GNU General Public License v3.0

PHP 100.00%
php php7 php5 database database-access database-connector database-management php-database php-database-connection php-database-class

phpedb's Introduction

PHP Easy Database

EDPHP

PHP Easy DB (Database) is an easy library to manage and control the database.

PHPED

Features

  • Tiny
  • Easy and fast query builder
  • Support most of the sql function

Using

$db=new database();
$db->connect("localhost", "username", "*****");
$db->db="database_name";
$db->create_database($db->db, false);

See more tests php file

Functions

function connect($host="localhost", $user="root", $pass="") {...}
function check() {...}
function disconnect() {...}
function query($query, $error=true) {...}
function create_database($name, $error=true) {...}
function selects($table, $clause=[], $after="", $__sql="") {...}
function select($table, $clause=[], $after="") {...}
function count($table, $clause=[]) {...}
function delete($table, $clause=[]) {...}
function insert($table, $values) {...}
function update($table, $clause, $values) {...}
function selectRaw($query) {...}
function selectsRaw($query) {...}

Example

$count=$db->count("account", $clauses);

$accountID=$db->insert("account", $values);

$result=$db->selectRaw("SELECT floor(avg(value)) as star FROM `$db->db`.`rate` WHERE `postID` = " . $id);

$result=$db->selectsRaw("SELECT * FROM `$db->db`.`account` INNER JOIN `$db->db`.`team` ON account.id = team.accountID WHERE team.postID=". $id .";");

$result=$db->selectsRaw("SELECT `accountID` FROM `$db->db`.`rate` WHERE `postID`=". $id ." ORDER BY `id`,`value` DESC LIMIT 4");

Max Base

My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)

Asrez Team

A team includes some programmer, developer, designer, researcher(s) especially Max Base.

Asrez Team

phpedb's People

Contributors

basemax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.