{"id":6833,"date":"2025-03-06T04:14:06","date_gmt":"2025-03-06T04:14:06","guid":{"rendered":"https:\/\/s-o-s.net\/product\/pdomodel-database-abstraction-and-helper-php-class\/"},"modified":"2025-04-17T18:58:16","modified_gmt":"2025-04-17T18:58:16","slug":"pdomodel-database-abstraction-and-helper-php-class","status":"publish","type":"product","link":"https:\/\/s-o-s.net\/en_gb\/product\/pdomodel-database-abstraction-and-helper-php-class\/","title":{"rendered":"PDOModel &#8211; Database abstraction and helper PHP class"},"content":{"rendered":"<p><br \/>\n<br \/>\n<a class=\"wp_automatic_demo_btn broken_link\" target=\"_blank\" href=\"https:\/\/codecanyon.net\/item\/pdomodel-database-abstraction-and-helper-php-class\/full_screen_preview\/15832775\" rel=\"noopener\">LIVE PREVIEW<\/a> <a class=\"wp_automatic_buy_btn broken_link\" target=\"_blank\" href=\"https:\/\/codecanyon.net\/item\/pdomodel-database-abstraction-and-helper-php-class\/15832775\" rel=\"noopener\">LIVE ORDER $15<\/a><br \/>\n<br \/>\n<img decoding=\"async\" src=\"https:\/\/previews.customer.envatousercontent.com\/files\/545041675\/Database-abstraction-and-helper-PHP-class.jpg\"><br \/>\n<a><span style=\"font-size: 20px\">PDOModel &#8211; Database abstraction and helper PHP class<\/span><\/a><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3.envato.com\/files\/247260971\/codecanyon-logo.jpg\" width=\"25\" height=\"25\"> <a href=\"https:\/\/codecanyon.net\/user\/ddeveloper\" target=\"_blank\" rel=\"noopener\">ddeveloper<\/a><br \/>\n<\/p>\n<h2 id=\"item-description__-pdomodel-database-abstraction-and-helper-php-class-that-helps-to-do-insert\"> &#8220;PDOModel is a powerful database abstraction and helper PHP class that simplifies insert, update, delete, and select operations using PDO\u2014no queries required and with minimal code. It seamlessly supports MySQL, PostgreSQL, SQLite, Oracle and SQL Server databases.&#8221;. <\/h2>\n<p><a target=\"_blank\" href=\"https:\/\/demo.digitaldreamstech.com\/pdomodel\/documentation\/pdo\/index.php\" rel=\"nofollow noopener\">Documentation<\/a><br \/>\n<\/p>\n<p> Version 1.3 &#8211; PDOModel now supports Oracle and SQL Server along with PGSQL, SQLite and Mysql.<\/p>\n<p>\nPDOModel provides a complete solution to perform <strong>CRUD<\/strong> operations on three different types of databases (Mysql, Postgres and Sqlite). It provides various helper functions to export data directly to <strong>csv,excel,xml,pdf,html<\/strong> and many more useful functions.<br \/>\n<\/p>\n<h3 id=\"item-description__example-of-how-to-write-sql-select-query-using-pdomodel\">Example of how to write SQL select query using PDOModel<\/h3>\n<p><code><br \/>\n$pdomodel = new PDOModel(); \/\/create object of the PDOModel class<br \/>\n$pdomodel-&gt;connect(\"localhost\", \"root\", \"\", \"pdocrud\");\/\/connect to database<br \/>\n$result =  $pdomodel-&gt;select(\"emp\");  \/\/select * from `emp`<br \/>\n<\/code><br \/>\n<\/p>\n<p>That&#8217;s it, you need to write just 2-3 line of code. You can write very complex queries using PDOModel functions<\/p>\n<h2 id=\"item-description__-pdomodel-supports-three-type-of-database-mysql-postgres-and-sqlite\">\n<br \/>\n<img decoding=\"async\" src=\"http:\/\/demo.digitaldreamstech.com\/PDOModel\/images\/pdo-db-connections.jpg\" alt=\"PDOModel - Database abstraction and helper PHP class - 1\" \/><br \/>\n<br \/>\nPDOModel supports three type of database, Mysql, Postgres and Sqlite.<br \/>\n<\/h2>\n<h2 id=\"item-description__-pdomodel-script-allows-you-to-export-data-directly-in-various-database\">\n<br \/>\n<img decoding=\"async\" src=\"http:\/\/demo.digitaldreamstech.com\/PDOModel\/images\/pdomodel-export.jpg\" alt=\"PDOModel - Database abstraction and helper PHP class - 2\" \/><br \/>\n<br \/>\nPDOModel script allows you to export data directly in various database formats.<br \/>\n<\/h2>\n<p><img decoding=\"async\" src=\"http:\/\/demo.digitaldreamstech.com\/PDOModel\/images\/PDOModelFeatures.jpg\" alt=\"PDOModel - Database abstraction and helper PHP class - 3\" \/><br \/>\n<\/p>\n<h2 id=\"item-description__examples\">Examples<\/h2>\n<p><code><br \/>\n$pdomodel = new PDOModel();\/\/create object<br \/>\n$pdomodel-&gt;connect(\"localhost\", \"root\", \"\", \"pdocrud\");\/\/connect to database - three different database type available<\/p>\n<p>\/* INSERT , UPDATE AND DELETE OPERATION *\/<br \/>\n$pdomodel-&gt;insert(\"emp\", array(\"firstName\" =&gt; \"John\", \"lastName\" =&gt; \"Jonathan\", \"gender\" =&gt; \"male\"));<\/p>\n<p>$pdomodel-&gt;where(\"orderId\", 7);<br \/>\n$pdomodel-&gt;update(\"order\", array(\"orderNumber\"=&gt;\"44\", \"customerName\"=&gt;\"BKG\", \"address\"=&gt;\"140 shakti nagar\"));<\/p>\n<p>$pdomodel-&gt;where(\"orderId\", 7);<br \/>\n$pdomodel-&gt;delete(\"order\");<\/p>\n<p>\/* SELECT *\/<br \/>\n$result =  $pdomodel-&gt;select(\"emp\");<\/p>\n<p>\/* WHERE, AND, OR, BETWEEN, GROUP BY, ORDER BY, LIKE , HAVING *\/<br \/>\n$pdomodel-&gt;where(\"orderNumber\", \"5\", \"!=\");<\/p>\n<p>$pdomodel-&gt;openBrackets =\"(\";<br \/>\n$pdomodel-&gt;where(\"city\", \"Indore\", \"=\");<br \/>\n$pdomodel-&gt;andOrOperator=\"OR\";<br \/>\n$pdomodel-&gt;closedBrackets =\")\";<\/p>\n<p>$pdomodel-&gt;groupByCols = array(\"orderId\");<\/p>\n<p>$pdomodel-&gt;orderByCols = array(\"orderId desc\", \"state asc\");<\/p>\n<p>$pdomodel-&gt;havingCondtion = array(\"sum(orderId)&gt;2\");<\/p>\n<p>$pdomodel-&gt;limit = \"0,5\";<\/p>\n<p>$pdomodel-&gt;where(\"empId\", array(36,37), \"BETWEEN\");<\/p>\n<p>$pdomodel-&gt;where(\"firstName\", '%P%', \"LIKE\");<\/p>\n<p>$pdomodel-&gt;where(\"empId\", array(36,37,39,40), \"IN\");<\/p>\n<p>\/* subquery\/inner query *\/<br \/>\n$pdomodel-&gt;subQuery(\"select empId from emp where empId=?\",\"empId\",array(34));<\/p>\n<p>\/* where subquery *\/<br \/>\n$pdomodel-&gt;where_subquery(\"orderId\", \"select orderId from `order` where orderId=?\", \"IN\",array(10));<\/p>\n<p>\/*rename, trucate, drop table, column name, primary key, tablefield info*\/<br \/>\n$pdomodel-&gt;truncateTable(\"wp_postmeta\");<br \/>\n$pdomodel-&gt;renameTable(\"states\",\"state\");<br \/>\n$pdomodel-&gt;dropTable(\"empleave\");<br \/>\n$records = $pdomodel-&gt;columnNames(\"order\");<br \/>\n$records = $pdomodel-&gt;primaryKey(\"order\");<br \/>\n$records = $pdomodel-&gt;tableFieldInfo(\"order\");<\/p>\n<p>\/*execute sql*\/<br \/>\n$result =  $pdomodel-&gt;executeQuery(\"select * from emp where empId = ?\", array(39));<\/p>\n<p><\/code><br \/>\n<\/p>\n<h2 id=\"item-description__main-features\">Main Features:<\/h2>\n<ol>\n<li>Perform Insert, update, delete, and select operations using simple functions<\/li>\n<li>Three different types of database support (Mysql, PGSql, SQLServer, Oracle and SQLite)<\/li>\n<li>Complex queries support with use of multiple &#8220;and&#8221; and &#8220;or&#8221;<\/li>\n<li>Multiple table join Operation  using simple functions<\/li>\n<li> Table-related operations like getting all tables from a database, truncating table, deleting table, renaming table etc.<\/li>\n<li>Subquery\/inner query can be embedded<\/li>\n<li> Column-based operation like getting all columns of the table, the primary key of the table etc<\/li>\n<li>Export functions to export data in CSV, PDF, Excel, HTML, XML Format<\/li>\n<li>Helper functions  like pagination, random password generation<\/li>\n<li>Best practices using PDO with use of prepared statements<\/li>\n<li>Support for PDO Transactions<\/li>\n<li>Support for batch operations for insert, update and delete<\/li>\n<li>Execute query directly with parameter binding<\/li>\n<li>Various debugging options like get last query, get rows inserted, error messages etc<\/li>\n<li>Support for order by, group by, like, between, in, not in, having etc<\/li>\n<li>Well documented and demo codes to make things easier to understand<\/li>\n<li>Supports method chaining<\/li>\n<li>Batch operations for faster result<\/li>\n<\/ol>\n<p>\n<\/p>\n<h3 id=\"item-description__-version-2-1\"> Version 2.1<\/h3>\n<p><\/p>\n<p>Added-<\/p>\n<ul>\n<li>Now support the Oracle database.<\/li>\n<li> Updated to meet latest PHP version requirements<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"item-description__-version-1-4\"> Version 1.4<\/h3>\n<p><\/p>\n<p>Added-<\/p>\n<ul>\n<li>Now support the Insert On Duplicate Update statement also.<\/li>\n<li> Resolved bug for sqlite<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"item-description__-version-1-3\"> Version 1.3 <\/h3>\n<p><\/p>\n<p>Added-<\/p>\n<ul>\n<li>Now support sql server database also. Please note that you must have SQLServer extension installed for this.<br \/>\nFor more details, check here <a target=\"_blank\" href=\"http:\/\/php.net\/manual\/en\/ref.pdo-sqlsrv.php\" rel=\"nofollow noopener\">http:\/\/php.net\/manual\/en\/ref.pdo-sqlsrv.php<\/a><\/li>\n<li> Resolved bug for sqlite<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"item-description__-version-1-2\"> Version 1.2 <\/h3>\n<p><\/p>\n<p>Added-<\/p>\n<ul>\n<li>Json export option<\/li>\n<li>CSV Import option<\/li>\n<li>Excel Import option<\/li>\n<li>XML Import option<\/li>\n<li> Various functions to support chaining<\/li>\n<li> Resolved bug for truncate function for sqlite<\/li>\n<li>improved documentation<\/li>\n<\/ul>\n<p>\nMin requirement for the script <br \/>\nPHP Version 5.3 and above<br \/>\nMust have write access for the download folder<\/p>\n<h3 id=\"item-description__credits\">Credits:<\/h3>\n<p>Tcpdf<br \/>\nphpExcel<\/p>\n<p><\/p>\n<h3 id=\"item-description__-our-other-popular-script\"> Our other popular script<\/h3>\n<p><a target=\"_blank\" href=\"https:\/\/codecanyon.net\/item\/wordpress-awesome-import-export-plugin\/12896266\" rel=\"noopener\" class=\"broken_link\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/image-cc.s3.envato.com\/files\/176648286\/main_image_jpg.jpg\" alt=\"Wordpress awesome import and export plugin\" \/><\/a><\/p>\n<p>\n<br \/>\n<br \/>\n<a href=\"https:\/\/codecanyon.net\/item\/pdomodel-database-abstraction-and-helper-php-class\/15832775\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">Source link<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>LIVE PREVIEW LIVE ORDER $15 PDOModel &#8211; Database abstraction and helper PHP class ddeveloper &#8220;PDOModel is a powerful database abstraction and helper PHP class that simplifies insert, update, delete, and select operations using PDO\u2014no queries required and with minimal code. It seamlessly supports MySQL, PostgreSQL, SQLite, Oracle and SQL Server databases.&#8221;. Documentation Version 1.3 &#8211; [&hellip;]<\/p>","protected":false},"featured_media":6834,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"give_campaign_id":0},"product_brand":[],"product_cat":[3339,3331,3329],"product_tag":[4631,4632,3480,4457,3455,3377],"class_list":{"0":"post-6833","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-database-abstraction-php-script","7":"product_cat-php-script-solution","8":"product_cat-pro-version","9":"product_tag-abstraction","10":"product_tag-class","11":"product_tag-database","12":"product_tag-helper","13":"product_tag-pdomodel","14":"product_tag-php","16":"first","17":"instock","18":"shipping-taxable","19":"purchasable","20":"product-type-simple","21":"add-to-wishlist-after_add_to_cart"},"acf":[],"fifu_image_url":"https:\/\/previews.customer.envatousercontent.com\/files\/545041675\/Database-abstraction-and-helper-PHP-class.jpg","_links":{"self":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product\/6833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/comments?post=6833"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/media\/6834"}],"wp:attachment":[{"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/media?parent=6833"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_brand?post=6833"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_cat?post=6833"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/s-o-s.net\/en_gb\/wp-json\/wp\/v2\/product_tag?post=6833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}