Download the PHP package hackerpro536/pdo-class-wrapper without Composer

On this page you can find all versions of the php package hackerpro536/pdo-class-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdo-class-wrapper

PHP PDO Class Wrapper

[A Wrapper Class of PDO]

Version 1.3

New update for PHP8
Project information

Our Service - Dịch vụ của chúng tôi

Installation

System requirements

Please keep in mind that this project is licensed by LP Group:

  1. Only authenticated developers can download from the link above.
  2. Published website must be PMS authorised clients.

Any other cases of uses not mentioned above is prohibited. If you have illegal copy of this project, please kindly to contact us for our further supporting.

LP Group

  1. HackerPro536 (LE VAN PHU) - CEO.
    Introduction:

PDO Class Wrapper is a wrapper class of PDO (PHP Data Object) library. As we know that in any web application, database makes an important role for developer to create a good dynamic web application. We can use different database drivers to make web more and more interactive and dynamic. But in any web project we also know that Security is a big part and concern for developers. Every developer wants to keep user's data very safe. Hence, we use much built-in functionality in PHP to prevent unauthorized access for database e.g. mysql_real_escape_string (), addslashes () etc. But some time it's very difficult to manage big application with big chunk of code. So PHP improves MySQL to MySQLi (MySQL Improved). According to php.net The MySQLi extension has a number of benefits, the key enhancements over the MySQL extension being:Object-oriented interface

  1. Support for Prepared Statements
  2. Support for Multiple Statements
  3. Support for Transactions
  4. Enhanced debugging capabilities
  5. Embedded server support


What is the PDO MYSQL driver?

The PDO MYSQL driver is not an API as such, at least from the PHP programmer's perspective. In fact the PDO MYSQL driver sits in the layer below PDO itself and provides MySQL-specific functionality. The programmer still calls the PDO API, but PDO uses the PDO MYSQL driver to carry out communication with the MySQL server. The PDO MYSQL driver is one of several available PDO drivers. Other PDO drivers available include those for the Firebird and PostgreSQL database servers. The PDO MYSQL driver is implemented using the PHP extension framework. Its source code is located in the directory ext/pdo_mysql. It does not expose an API to the PHP programmer.


Comparison of MySQL API options for PHP

PDO Comparison

About PDO Class Wrapper:

PDO Class Wrapper is a wrapper class of PDO (PHP Data Object) library. It has many useful built in functions to manage your web application database code very shorter. Also you will find some helpful method to fix your bug with very ease.

[source: Net Tut+]

Advantage of using PDO:

Many PHP programmers learned how to access databases by using either the MySQL or MySQLi extensions. As of PHP 5.1, there is a better way. PHP Data Objects (PDO) provides methods for prepared statements and working with objects that will make you far more productive!

PDO Class Wrapper Features:

PDO Class Wrapper has very classic methods like any database class library:

  1. MySQL query pdoQuery()
  2. MySQL select query select ()
  3. MySQL insert query insert ()
  4. MySQL insert batch insertBatch()
  5. MySQL update query update()
  6. MySQL delete query delete()
  7. MySQL truncate table truncate()
  8. MySQL drop table drop()
  9. MySQL describe table describe()
  10. MySQL count records count()
  11. Show/debug executed query showQuery()
  12. Get last insert id getLastInsertId()
  13. Get all last insert id getAllLastInsertId()
  14. Get MySQL results results()
  15. Get MySQL result result()
  16. Get status of executed query affectedRows()
  17. MySQL begin transactions start()
  18. MySQL commit the transaction end()
  19. MySQL rollback the transaction back()
  20. Debugger PDO Error setErrorLog()
How to Connect PDO Class:
Example: [A]
Example: [B]

PDO Class Wrapper Methods Explanations:

pdoQuery():

Method name and parameter

pdoQuery ( string $sSql, array $aBindWhereParam)

Explanations: This method is use for simple MySQL query; you can execute your MySQL query with parameterized parameter or as simple query.

Example:

select():

Method name and parameter

select (string $sTable , array $aColumn, array $aWhere, string $sOther)

Explanations: The select method is made for get table data from just pass table name in method, if you omit column then you will get all fields of requested table else you can pass table field by an array. If you want to pass a where clause then you can use third parameter of select method and by pass fourth parameter you can send other filters.

Example:

insert():

Method name and parameter

insert( string $sTable, array $aData )

Explanations: By insert method you can insert record into selected table. Just pass data as an array with fields as array key and the array data will insert in to table. Insert method automatically convert your array data in to SQL injection safe data.

Example:

insertBatch():

Method name and parameter

insertBatch(string $sTable, array $aData, boolean $safeModeInsert )

Explanations: You can use this method for inserting multiple array data in same table. You have to just send full array data and rest of thing insertBatch will handle. You can send third parameter as false if you don't want to insert parameterize insert or send true if want to secure insertions. insertBatch works with MySQL transactions so you don't need to worry about failure data. It will be rollback if anything goes wrong.

Example:

update():

Method name and parameter

update( string $sTable, array $aData, array $aWhere, string  $sOther)

Explanations: Update method is use for update a table with array data. You can send array data as update data in table.

Example:

delete():

Method name and parameter

delete( string $sTable, array $aWhere, string  $sOther )

Explanations: You can delete records from table by send table name and your where clause array.

Example:

truncate():

Method name and parameter

truncate( string $sTable )

Explanations: You can truncate table by just pass table name.

Example:

drop():

Method name and parameter

drop( string $sTable )

Explanations: You can drop table by just pass table name.

Example:

describe():

Method name and parameter

describe( string $sTable )

Explanations: You can get a table field name and data type.

Example:

count():

Method name and parameter

count( string $sTable, string $sWhere )

Explanations: This function will return the number of total rows in a table.

Example:

showQuery():

Method name and parameter

showQuery( Boolean $logfile )

Explanations: By this function you can get executed query. It will show raw query on your screen. If you want to logfile to save query then you can send 2nd param as true. By default it's false.

Example:

getLastInsertId():

Method name and parameter

getLastInsertId()

Explanations: Get a newly inserted id by insert function.

Example:

$lid = $db->getLastInsertId();

Return: Number/Integer

getAllLastInsertId():

Method name and parameter

getAllLastInsertId ()

Explanations: Get all newly inserted id by insertBatch function.

Example:

$lid = $db->getAllLastInsertId();

Return: Array

results():

Method name and parameter

results (string $type )

Explanations: Get array result data by executed SELECT or Select Query. You can get result in three formats Array, XML and JSON. Just pass 1st param as 'array' or 'xml' or 'json'. By default it will return array.

Example:

Return: Array | XML | JSON

result():

Method name and parameter

results (integer $iRow)

Explanations: Get result from an array data by request index or false.

Example:

$data = $db->result(1);

Return: Array | false

affectedRows():

Method name and parameter

affectedRows()

Explanations: Get number of affected rows by update, delete and select etc. statement or false.

Example:

$data = $db->affectedRows();

Return: integer | false

start():

Method name and parameter

start()

Explanations: Start the MySQL transaction.

Example:

$db->start();

end():

Method name and parameter

end()

Explanations: Commit the MySQL transaction.

Example:

$db->end();

back():

Method name and parameter

back()

Explanations: Rollback the MySQL transaction.

Example:

$db->back();

setErrorLog():

Method name and parameter

setErrorLog (boolean $mode)

Explanations: setErrorLog, method works for show/hide PDO error. If you send true then all errors will show on screen or if you send false then all errors will store in log file in same location.

Example:

$db->setErrorLog(true);

Example Connection Page:


All versions of pdo-class-wrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hackerpro536/pdo-class-wrapper contains the following files

Loading the files please wait ...