TAKE THE FIRST STEP
WE WILL DO THE REST

🧡 Recommended Tea $9.00

USE CASE for ALREADY HAVE a PHP WEBSITE if YOUR ITEM is ADD-ON PHP:
- Pay an Item via LIVE ORDER for OUR AFFILIATE only.
- Pay a Tea via FREE SETUP for PAYPAL & DEBIT / CREDIT CARD only.

PLACE ORDER for FREE SETUP with ORDER NOTES at CHECK OUT:
1. Add YOUR DOMAIN (Ex: domain.com) registered by yourself at Domain Name Registration.
2. Add YOUR HOSTING (Ex: domain.com) registered by yourself at Linux Shared Hosting.
3. Add YOUR WEBSITE (Ex: domain.com|admin|password) hosted by yourself at Linux Shared Hosting.
4. Add YOUR ACCOUNT (Ex: username|password) or DOWNLOAD LINK (Ex: drive.google.com/file) paid by yourself at Theme Forest or Code Canyon.

Warranty: 7 Days

$

🧡 Recommended Tea $9.00

💚 Minimum Tea$3.00

❤️ Maximum Tea$300.00

Report Abuse

Description



LIVE PREVIEW LIVE ORDER $15


PDOModel – Database abstraction and helper PHP class
ddeveloper

“PDOModel is a powerful database abstraction and helper PHP class that simplifies insert, update, delete, and select operations using PDO—no queries required and with minimal code. It seamlessly supports MySQL, PostgreSQL, SQLite, Oracle and SQL Server databases.”.

Documentation

Version 1.3 – PDOModel now supports Oracle and SQL Server along with PGSQL, SQLite and Mysql.

PDOModel provides a complete solution to perform CRUD operations on three different types of databases (Mysql, Postgres and Sqlite). It provides various helper functions to export data directly to csv,excel,xml,pdf,html and many more useful functions.

Example of how to write SQL select query using PDOModel


$pdomodel = new PDOModel(); //create object of the PDOModel class
$pdomodel->connect("localhost", "root", "", "pdocrud");//connect to database
$result = $pdomodel->select("emp"); //select * from `emp`

That’s it, you need to write just 2-3 line of code. You can write very complex queries using PDOModel functions


PDOModel - Database abstraction and helper PHP class - 1

PDOModel supports three type of database, Mysql, Postgres and Sqlite.


PDOModel - Database abstraction and helper PHP class - 2

PDOModel script allows you to export data directly in various database formats.

PDOModel - Database abstraction and helper PHP class - 3

Examples


$pdomodel = new PDOModel();//create object
$pdomodel->connect("localhost", "root", "", "pdocrud");//connect to database - three different database type available

/* INSERT , UPDATE AND DELETE OPERATION */
$pdomodel->insert("emp", array("firstName" => "John", "lastName" => "Jonathan", "gender" => "male"));

$pdomodel->where("orderId", 7);
$pdomodel->update("order", array("orderNumber"=>"44", "customerName"=>"BKG", "address"=>"140 shakti nagar"));

$pdomodel->where("orderId", 7);
$pdomodel->delete("order");

/* SELECT */
$result = $pdomodel->select("emp");

/* WHERE, AND, OR, BETWEEN, GROUP BY, ORDER BY, LIKE , HAVING */
$pdomodel->where("orderNumber", "5", "!=");

$pdomodel->openBrackets ="(";
$pdomodel->where("city", "Indore", "=");
$pdomodel->andOrOperator="OR";
$pdomodel->closedBrackets =")";

$pdomodel->groupByCols = array("orderId");

$pdomodel->orderByCols = array("orderId desc", "state asc");

$pdomodel->havingCondtion = array("sum(orderId)>2");

$pdomodel->limit = "0,5";

$pdomodel->where("empId", array(36,37), "BETWEEN");

$pdomodel->where("firstName", '%P%', "LIKE");

$pdomodel->where("empId", array(36,37,39,40), "IN");

/* subquery/inner query */
$pdomodel->subQuery("select empId from emp where empId=?","empId",array(34));

/* where subquery */
$pdomodel->where_subquery("orderId", "select orderId from `order` where orderId=?", "IN",array(10));

/*rename, trucate, drop table, column name, primary key, tablefield info*/
$pdomodel->truncateTable("wp_postmeta");
$pdomodel->renameTable("states","state");
$pdomodel->dropTable("empleave");
$records = $pdomodel->columnNames("order");
$records = $pdomodel->primaryKey("order");
$records = $pdomodel->tableFieldInfo("order");

/*execute sql*/
$result = $pdomodel->executeQuery("select * from emp where empId = ?", array(39));


Main Features:

  1. Perform Insert, update, delete, and select operations using simple functions
  2. Three different types of database support (Mysql, PGSql, SQLServer, Oracle and SQLite)
  3. Complex queries support with use of multiple “and” and “or”
  4. Multiple table join Operation using simple functions
  5. Table-related operations like getting all tables from a database, truncating table, deleting table, renaming table etc.
  6. Subquery/inner query can be embedded
  7. Column-based operation like getting all columns of the table, the primary key of the table etc
  8. Export functions to export data in CSV, PDF, Excel, HTML, XML Format
  9. Helper functions like pagination, random password generation
  10. Best practices using PDO with use of prepared statements
  11. Support for PDO Transactions
  12. Support for batch operations for insert, update and delete
  13. Execute query directly with parameter binding
  14. Various debugging options like get last query, get rows inserted, error messages etc
  15. Support for order by, group by, like, between, in, not in, having etc
  16. Well documented and demo codes to make things easier to understand
  17. Supports method chaining
  18. Batch operations for faster result

Version 2.1

Added-

  • Now support the Oracle database.
  • Updated to meet latest PHP version requirements

Version 1.4

Added-

  • Now support the Insert On Duplicate Update statement also.
  • Resolved bug for sqlite

Version 1.3

Added-

Version 1.2

Added-

  • Json export option
  • CSV Import option
  • Excel Import option
  • XML Import option
  • Various functions to support chaining
  • Resolved bug for truncate function for sqlite
  • improved documentation

Min requirement for the script
PHP Version 5.3 and above
Must have write access for the download folder

Credits:

Tcpdf
phpExcel


Wordpress awesome import and export plugin



Source link

OVERCOME YOURSELF ONLY
TAKE THE LAST STEP

Reviews

There are no reviews yet.

Be the first to review “PDOModel – Database abstraction and helper PHP class”

Your email address will not be published. Required fields are marked *


Loading...

Vendor Information

  • Store Name: Code Canyon Vendor
  • Vendor: Code Canyon Vendor
  • Address: Victoria
    Australia
  • No ratings found yet!

Allow customer to Request for Coupon as Store Credit when the order is Cancelled by Vendor or Cancelled by Customer in Warranty Time.

OVERCOME YOURSELF ONLY
TAKE THE LAST STEP

Product Enquiry

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy