Git Product home page Git Product logo

database-mysqli-interface's Introduction

MySqli Interface

MySqli Interface is a php code which use to do basic CRUD operation.

Installation

Use the composer to install database-mysqli-interface.

composer require yusrub/database-mysqli-interface

Usage


require 'vendor/autoload.php';

$database = new Database('host', 'dbname', 'username', 'password'); # connect to database

# select all records from table
$database->select('tableName');
# apply where condition while selecting records from table where condtion can be string/array
$database->select('tableName', 'id = 5');
#multiple condition
$database->select('tableName', array(id => 5, age => 23));
#limit the records
$database->select('tableName', 'id = 5', $limit=5);
#insert the records
$database->insert('table',array(field1=>value1, field2=>value2))
#update the records
$database->update('table',array(field1=>value1, field2=>value2), 'condition_field = 2')
#delete the records
$database->delete('table', 'condition_field = 2')
$database->delete('table', array('condition_field => [1,2]))


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

database-mysqli-interface's People

Contributors

gul-rfg avatar yusrub avatar

Forkers

hvh25531

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.