Posts

PHP MySqli prepared Basic usage (select, insert & update)

PHP MySqli Basic usage (select, insert & update)   Article   Issues   38 Comments Written by   Saran   on March 10, 2013,     Updated November 22, 2017 After the deprecation of PHP MySQL extension in   2011 , alternative extension MySqli and PDO are available in PHP. MySqli and PDO are improved version and offer an object-oriented API and number of enhancement over the regular MySql extension. These extensions are much faster, efficient and totally secure against SQL injections. Today I’d like to show you the basic usage of MySqli, such as connect, select, insert, update and delete records. I hope this list will come in handy for you. Installing MySqli Connect to Database SELECT Multiple Records as Associative array SELECT Multiple Records as Array SELECT Multiple Records as Objects SELECT Single value SELECT COUNT Total records of a table SELECT Using Prepared Statements SELECT all records from past X day, month or year INSERT Record INSERT Record