Code Monkey home page Code Monkey logo

ultimatemysql's Introduction

ultimatemysql

MySQL database access wrapper compatible with PHP 8

Based on the excellent work of Jeff Williams https://www.phpclasses.org/package/3698-PHP-MySQL-database-access-wrapper.html

Why this repository

Despite it is being used by fortune 500 companies [source], the script isn't update since 16/08/2013 (almost 10 years!), so i thinked to create this repository with the aim of making it compatible with PHP 8, and being able to use it for another 10 years (i hope!).

How to get started

It's a very simple database access wrapper, well documented and safe against SQL injection hacks!

You can start with only 3 lines!

PHP Library

<?php
include("mysql.class.php");
$db = new MySQL(true, "testdb", "localhost", "root", "password");
$res = $db->QueryArray("SELECT * FROM Test");
?>

Composer package

...OR if you want to include it as a composer package, just type:

composer require ricci69/ultimatemysql

and after use the following PHP code

<?php
require 'vendor/autoload.php';
$db = new MySQL(true, "testdb", "localhost", "root", "password");
$res = $db->QueryArray("SELECT * FROM Test");
?>

Debug mode

The script looks for a file called .debugmysql (within the root directory or within the composer's vendor / module folder) and, if found, enters debug mode.

When debug mode is active, it writes all SQL queries executed inside the .debugmysql file.

How it work and examples

Check the "examples" directory to learn how it works, or read the very good documentation on https://ricci69.github.io/ultimatemysql

Contributions

Feel free to contribute to this project adding more feature or fixing issues, but before submitting a pull request, make sure your code passes all unit tests (refer to the /tests/coverage.md document)

Support this / me

If you liked this work, and you haven't wasted hours of work with this repository, you can think about supporting me with Ko-fi

ko-fi

ultimatemysql's People

Contributors

ricci69 avatar aponb avatar ortorob73 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.