Git Product home page Git Product logo

mysqllib's Introduction

Tafoya Ventures MySQLi Support Library

Example

$db = new MySQLLib("{database_username}"),{database_password},{database_name},{database_server_hostname});

Execute a select, with the response in on of three formats: Numeric Array [ARRAY_N], Associative Array [ARRAY_A], or an Object [OBJECT] which is the default.

$my_tables = $db->get_results(“SHOW TABLES”, ARRAY_N);

Execute a select which returns one row, with the response in on of three formats: Numeric Array [ARRAY_N], Associative Array [ARRAY_A], or an Object [OBJECT] which is the default.

$my_tables = $db->get_row(“SELECT * FROM example LIMIT 1”, ARRAY_N);

Execute a select which returns one column, with the response in on of three formats: Numeric Array [ARRAY_N], Associative Array [ARRAY_A], or an Object [OBJECT] which is the default.

$my_tables = $db->get_col(“SELECT example_col FROM example”, ARRAY_N);

Execute a select which returns one value.

$my_tables = $db->get_var(“SELECT example_col FROM example LIMIT 1”);

Execute a query, INSERT returns ID when record created.

$newRowID = $db->query(“INSERT INTO example_table SET example_col = 1”);

Execute a multiple queries.

$db->queryMulti(“INSERT INTO example_table SET example_col = 1; INSERT INTO example_table SET example_col = 2;”);

Escape a text string.

$escaped_string = (string)$db->escape(“Hello Word”);

Developer

Brian Tafoya [email protected] https://tafoyaventures.com

mysqllib's People

Contributors

btafoya avatar

Watchers

 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.