Skip to content

Extends and abstracts php5's MySqli class to provide effortless prepared queries and several convenience methods. Great for small php projects that don't need a big ORM.

Notifications You must be signed in to change notification settings

andyfinity/EZ-MySqli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

EZ_MySqli extends php's mysqli api to provide ease of use and simplicity to some of the original
extentions features.
The BIGGEST increase in ease of use is with prepared/parametarized queries.
Prepared queries separate the query from the data, which makes sql-injection a thing of the
past.  Any time you are sending user-submitted data of any kind (get, post, form data, etc...),
prepared queries are the secure way to do it.

Any function which takes a 'replacements' variable will replace question marks in the query or
where clause with the contents of 'replacements' automatically. ('replacements' can always be
either array or object)  If you do not wish for a query to be prepared, DO NOT SET THE 
'replacements' variable, and a normal query will be used instead.

The "insert()" and "update()" functions form prepared queries automatically, and this CANNOT be
overridden!
It should be noted, however, that the 'update()' function can take replacements for the WHERE
clause as well as using prepared queries on the data being updated.
 
If you need to do a prepared query the normal way, instead of using this libraries convience
methods, you are in luck, as NONE OF THE default methods (besides the query() method) have been
overriden!...so you can still run prepare() the normal way, and manually bind the parameters and
all that jazz.

License is creative commons, but give me (Eric Lien) credit please.

About

Extends and abstracts php5's MySqli class to provide effortless prepared queries and several convenience methods. Great for small php projects that don't need a big ORM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published