আগামী ৩০ নভেম্বর-২০১৭ তারিখ থেকে শুরু হচ্ছে পাঁচ মাস ব্যাপী Professional Web Design and Development with HTML, CSS PHP,MySQL,JavaScript, AJAX, JQUERY, Bootstrap and Live Project কোর্সের ৮৭ তম ব্যাচ এবং ২৪ নভেম্বর-২০১৭ তারিখ থেকে শুরু হচ্ছে চার মাস ব্যাপী Zend PHP-7 Certified PHP Engineering (Advance PHP) কোর্সের ৩৫ তম ব্যাচ। প্রত্যেকটি কোর্স এর ফী নির্ধারণ করা হয়েছে ৩০,০০০/= আগ্রহীদেরকে অতিসত্বর মাসুদ আলম স্যার এর সাথে যোগাযোগ করতে অনুরোধ করা যাচ্ছে। স্যার এর মোবাইল: 01722 81 75 91

PHP Data Object-PDO Basic

[printfriendly]

What is PDO?

  • a PHP5 extension written in a compiled language (C/C++)
  • a Lightweight DBMS connection abstract library (data access abstraction library)

Why PDO?

  • Support great number of database systems supported by PHP
  • You don’t need rewriting of many line code for each database. Just write one and run anywhere
  • Speed. PDO written in compiled language, PHP libraries (ADOdb, PEAR DB) written in an interpreted language
  • Your software more easy to install. Do not need third party software

Whenever you need PDO?

  • You need portable application that support many database system
  • You need speed

How to use PDO?

PDO: Introduction PHP Data Object

 PDO is a PHP5 extension that defines a lightweight DBMs connection abstraction library. Mmm, we ever talk about DMB connection abstraction library (sometimes called data access abstraction library).

What is data access abstraction library? As we know, PHP support several major database, such as mySQL, SQLite, msSQL, and so on. Each connection to those database have unique code. For example, we want to connect to mysql, we wil write:

mysql_connect($host, $user, $password);

If we want to connect to SQLite:

sqlite_open($db, 066);

for postgreSQL:

pg_connect(“host=$host dbname=$db user=$user password=$password”);

What that mean? For example, we have built application base on mysql. When our customer need move to SQLite, we must rebuild our application. We must rewrite many line code. How if our code consist 1,000,000 lines? Nightmare!

Data access abstraction layer will bridge the different. We just write once, and run in every where (like java he he he….)

Next, we talk how to activate PDO extension.

PDO: Activation PHP Data Objects Extension

Now, we try to activate this extension.

Open your php.ini. Usually within c:\wamp\bin\php\php5.3.5 (depend on your php installation). Uncomment at line extension=php_pdo.dll, extension=php_pdo_mysql.dll (if you want work with MySQL db), extension=php_pdo_oci.dll (if you want work with oracle db) and also you can others pdo extensions for many more databases.

Restart your apache. You can restart from services. If, you use windows XP, you can access from start > control panel > Performance and Maintenance > Administrative Tools > Services. Find apache, then click restart.

PDO: Connecting Use PHP Data Object

Now, we test to connect to database. We use mysql server. Before test, please create a database named “test”. Then create table “books” with query like this:

CREATE TABLE `books` (

`id` int(11) NOT NULL auto_increment,

`title` varchar(150) NOT NULL,

`author` varchar(150) NOT NULL,

`description` varchar(255) NOT NULL,

`on_sale` tinyint(1) NOT NULL,

PRIMARY KEY  (`id`)

);

Following query for sample data:

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (1, 'PHP AJAX', 'Andreas', 'This is good book for learning AJAX', 1);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (2, 'PHP Eclipse ', 'George', 'Nice book', 0);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (3, 'PHP Prado', 'Junyian', '-', 1);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (4, 'PHP Zend Framework', 'Ozulian', 'great', 0);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (5, 'PHP Web Services', 'Bobi', '', 0);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (6, 'PHP API', 'Hugo', '', 1);

INSERT INTO `books` (`id`, `title`, `author`, `description`, `on_sale`) VALUES (7, 'PHP SEO', 'Monteo', '', 1);

Now, this is sample connection to mysql database:

<?php

$host   = "localhost";

$db     = "pdo";

$user   = "root";

$pass   = "";

$conn = new PDO("mysql:host=$host;dbname=$db",$user,$pass);

$sql = "SELECT * FROM books";

$q      = $conn->query($sql) or die("failed!");

while($r = $q->fetch(PDO::FETCH_ASSOC)){

echo $r['title'];

}

?>

Output:

PDO: Possible Fetch Mode

Now, we will see posible mode to fetch data. In mysql, we know there are mysql_fetch_row(), mysql_fetch_array(), and mysql_fetch_assoc(). How about in PDO?

It is general that we use, without set fetch mode:

<?php

// configuration

$dbhost = "localhost";

$dbname= "pdo";

$dbuser= "root";

$dbpass= "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT title FROM books ORDER BY title";

$q = $conn->query($sql);

// fetch

while($r = $q->fetch()){

print_r($r);

echo "<br>";

}

// result

//Array ( [title] => PHP AJAX [0] => PHP AJAX )

//Array ( [title] => PHP API [0] => PHP API )

//Array ( [title] => PHP Eclipse [0] => PHP Eclipse )

//Array ( [title] => PHP Prado [0] => PHP Prado )

//Array ( [title] => PHP SEO [0] => PHP SEO )

//Array ( [title] => PHP Web Services [0] => PHP Web Services )

//Array ( [title] => PHP Zend Framework [0] => PHP Zend Framework )

?>

Fech Association

<?php

// configuration

$dbhost = "localhost";

$dbname= "pdo";

$dbuser= "root";

$dbpass= "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT title FROM books ORDER BY title";

$q = $conn->query($sql);

$q->setFetchMode(PDO::FETCH_ASSOC);

// fetch

while($r = $q->fetch()){

print_r($r);

echo "<br>";

}

// result

//Array ( [title] => PHP AJAX)

//Array ( [title] => PHP API)

//Array ( [title] => PHP Eclipse)

//Array ( [title] => PHP Prado)

//Array ( [title] => PHP SEO)

//Array ( [title] => PHP Web Services)

//Array ( [title] => PHP Zend Framework)

?>

Fetch Num (like mysql_fetch_row())

<?php

// configuration

$dbhost     = "localhost";

$dbname           = "pdo";

$dbuser           = "root";

$dbpass           = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT title FROM books ORDER BY title";

$q    = $conn->query($sql);

$q->setFetchMode(PDO::FETCH_NUM);

// fetch

while($r = $q->fetch()){

print_r($r);

echo "<br>";

}

// result

//Array ( [0] => PHP AJAX )

//Array ( [0] => PHP API )

//Array ( [0] => PHP Eclipse )

//Array ( [0] => PHP Prado )

//Array ( [0] => PHP SEO )

//Array ( [0] => PHP Web Services )

//Array ( [0] => PHP Zend Framework )

?>

Fetch Both (default)

<?php

// configuration

$dbhost     = "localhost";

$dbname           = "pdo";

$dbuser           = "root";

$dbpass           = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT title FROM books ORDER BY title";

$q    = $conn->query($sql);

$q->setFetchMode(PDO::FETCH_BOTH);

$q    = $conn->query($sql);

// fetch

while($r = $q->fetch()){

print_r($r);

echo"<br>";

}

// result

//Array ( [title] => PHP AJAX [0] => PHP AJAX )

//Array ( [title] => PHP API [0] => PHP API )

//Array ( [title] => PHP Eclipse [0] => PHP Eclipse )

//Array ( [title] => PHP Prado [0] => PHP Prado )

//Array ( [title] => PHP SEO [0] => PHP SEO )

//Array ( [title] => PHP Web Services [0] => PHP Web Services )

//Array ( [title] => PHP Zend Framework [0] => PHP Zend Framework )

?>

PDO: Prepared Statement

Do you ever hear about prepared statements? If you ever work with other tool such visual studio, may be you use prepare statement. PHP Extension for MySQL and SQLite don’t offer this functionality. Ok, I will show a sample. I believe, from that sample you will understand what is prepare statement.

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

$title = 'PHP AJAX';

// query

$sql = "SELECT * FROM books WHERE title = ?";

$q = $conn->prepare($sql);

$q->execute(array($title));

$q->setFetchMode(PDO::FETCH_BOTH);

// fetch

while($r = $q->fetch()){

print_r($r);

}

?>

In this simple example, query depends on a variabel (we write with ?).

$sql = “SELECT * FROM books WHERE title = ?”;

Now, we manipulate this query to create the prepared statement and execute it:

$q = $conn->prepare($sql);

$q->execute(array($title))

Another sample:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

$title = 'PHP%';

$author = 'Bobi%';

// query

$sql = "SELECT * FROM books WHERE title like ? AND author like ?";

$q = $conn->prepare($sql);

$q->execute(array($title,$author));

$q->setFetchMode(PDO::FETCH_BOTH);

// fetch

while($r = $q->fetch()){

print_r($r);

echo"<br>";

}

?>

PDO: Positional and Named Placeholders

We had known about prepare statement from previous post. Now, we talk deeper about placeholder.

Positional Placeholders

Give attention to this query:

$title = ‘PHP%’;

$author = ‘Bobi%’;

// query

$sql = “SELECT * FROM books WHERE title like ? AND author like ? “;

$q = $conn->prepare($sql);

$q->execute(array($title,$author));

The query above used question marks to designate the position of values in the prepared statement. These question marks are called positional placeholders. We must take care of proper order of the elements in the array that we are passing to the PDOStatement::execute() method.

Named Placeholders

Give attention to this query:

$title = ‘PHP%’;

$author = ‘Bobi%’;

// query

$sql = “SELECT * FROM books WHERE title like :title AND author like :author “;

$q = $conn->prepare($sql);

$q->execute(array(‘:author’=>$author,

‘:title’=>$title));

This use descriptive names preceded by a colon, instead of question marks. We don’t care about position/order of value. That’s why it called named placeholders.

Now we will implement prepared statement for insert and update data. I will show simple example.

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// new data

$title = 'PHP Security';

$author = 'Jack Hijack';

// query

$sql = "INSERT INTO books (title,author) VALUES (:title,:author)";

$q = $conn->prepare($sql);

$q->execute(array(':author'=>$author,':title'=>$title));

?>

Example for update data:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// new data

$title = 'PHP Pattern';

$author = 'Imanda';

$id = 3;

// query

$sql = "UPDATE books SET title=?, author=? WHERE id=?";

$q = $conn->prepare($sql);

$q->execute(array($title,$author,$id));

?>

PDO: Prepared Statement and Bound Values

PDO also supports bound statements where you can explicitly bind an immediate value or a variable to a named or positional placeholder. Look this sample:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// new data

// query

$sql = "SELECT * FROM books";

$q = $conn->prepare($sql);

$q->execute();

$q->bindColumn(1, $id);

$q->bindColumn(2, $title);

$q->bindColumn(3, $author);

while($q->fetch())

{

echo "$title, $author <br/>";

}

?>

PDO: Working With BLOBs

We can store images or other document into database (such as MySQL). For this job, we will work with BLOB field in table. Ok, let’s do it!

First, create a table that have BLOB file. I will create table named “books”:

CREATE TABLE `books2` (

`id` int(11) NOT NULL auto_increment,

`title` varchar(150) NOT NULL,

`author` varchar(150) NOT NULL,

`description` varchar(255) NOT NULL,

`on_sale` tinyint(1) NOT NULL,

`cover` blob NOT NULL,

PRIMARY KEY  (`id`)

);

Sample for insert data:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// new data

$title = "ZEND FRAMEWORK TUTORIAL";

$author = "PHP Everyday";

$cover = fopen('7.png','rb');

// query

$sql = "INSERT INTO books2 (title,author,cover) values(?,?,?)";

$q = $conn->prepare($sql);

$q->bindParam(1, $title);

$q->bindParam(2, $author);

$q->bindParam(3, $cover, PDO::PARAM_LOB);

$q->execute();

?>

Ok, now, this is sample for retrieve data:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT id,title,author,cover FROM books2";

$q = $conn->prepare($sql);

$q->execute();

$q->bindColumn(1, $id);

$q->bindColumn(2, $title);

$q->bindColumn(3, $author);

$q->bindColumn(4, $cover, PDO::PARAM_LOB);

while($q->fetch())

{

file_put_contents($id.".jpg",$cover);

echo "$title, $author, &lt;img src='".$id.".jpg'&gt; &lt;br/&gt;";

}

?>

PDO: Alternative Retrieve BLOB Data

Now, we have talked about BLOB. We practice how to insert data and retrieve data. Now, we talk alternative for retrieve data.

Just remembering, we use this code to retrieve data at previous post:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT id,title,author,cover FROM books2";

$q = $conn->prepare($sql);

$q->execute();

$q->bindColumn(1, $id);

$q->bindColumn(2, $title);

$q->bindColumn(3, $author);

$q->bindColumn(4, $cover, PDO::PARAM_LOB);

while($q->fetch())

{

file_put_contents($id.".jpg",$cover);

echo "$title, $author, <img src='".$id.".jpg'> <br/>";

}

?>

At line 13, we create a file. Content of this file from BLOB data. Then we call this file at line 14. With this way, we always create file physically.

Alternative way, we can generate ‘virtual’ file on the fly. Create a file named “cover.php” with this code:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT cover FROM books2 WHERE id=".$_GET['id'];

$q = $conn->prepare($sql);

$q->execute();

$q->bindColumn(1, $cover, PDO::PARAM_LOB);

$q->fetch(PDO::FETCH_BOUND);

header("Content-Type: image/png");

echo $cover;

?>

This page only show a image. Then we update retrieving data like this:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$sql = "SELECT id,title,author,cover FROM books2";

$q = $conn->prepare($sql);

$q->execute();

$q->bindColumn(1, $id);

$q->bindColumn(2, $title);

$q->bindColumn(3, $author);

$q->bindColumn(4, $cover, PDO::PARAM_LOB);

while($q->fetch())

{

echo "$title, $author, <img src='cover.php?id=".$id."'> <br/>";

}

?>

I just want to show how to retrieve data from BLOB field. For looping, it is not efficient use above ways for production.

PDO: Setting Connection Attributes

There is a feature in PDO that we called connection attributes. This advance functionality can we use to modify column names, case conversion, and so on. Still confuse? It is simple, look at following sample.

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$conn->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER);

$sql = "SELECT * FROM books";

$q = $conn->prepare($sql);

$q->execute();

$r = $q->fetch(PDO::FETCH_ASSOC);

print_r($r);

//result:

//Array ( [ID] => 1

//        [TITLE] => PHP AJAX

//        [AUTHOR] => Andreas

//        [DESCRIPTION] => This is good book for learning AJAX

//        [ON_SALE] => 1

//        [COVER] => )

?>

Ok, now look at line 13:

$conn->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER);

We use connection attributes, PDO::ATTR_CASE. This attribute controls the case of column names that are returned by the PDOStatement::fetch(). It will work if fetch mode is PDO::FETCH_ASSOC or PDO::FETCH_BOTH, because the row returned as an array the contains columns indexed by their name. From code above, will get result:

Array ( [ID] => 1

[TITLE] => PHP AJAX

[AUTHOR] => Andreas

[DESCRIPTION] => This is good book for learning AJAX

[ON_SALE] => 1

[COVER] => )

Others value for this attribute: PDO::CASE_LOWER and PDO::CASE_NATURAL.

PDO: Error Mode Attributes

We will talk about PDO::ERRMODE. This attribute controls the error reporting mode. It have three value: PDO::ERRMODE_SILENT, PDO::ERRMODE_WARNING, and PDO:ERRMODE_EXCEPTION. Ok, let’s talk about them.

PDO::ERRMODE_SILENT: when there is error, no action is taken. The error codes are available via PDO::errorCode() and PDO::errorInfo(). It is default value for PDO::ATTR_ERRMODE.

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);

// query

$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);

$sql = "SELECT * FROM booksa";

$q = $conn->query($sql) or die("ERROR: " . implode(":", $conn->errorInfo()));

$r = $q->fetch(PDO::FETCH_ASSOC);

print_r($r);

//result:

//ERROR: 42S02:1146:Table 'test.booksa' doesn't exist

?>

PDO::ERRMODE_WARNING: No action is taken, but an error will be raised with E_WARNING level.

// query

$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);

$sql = "SELECT * FROM booksa";

$q = $conn->query($sql) or die("ERROR: " . implode(":", $conn->errorInfo()));

$r = $q->fetch(PDO::FETCH_ASSOC);

print_r($r);

//result:

//Warning: PDO::query() [function.PDO-query]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.booksa' doesn't exist in

//C:\AppServ5\www\test\pdo\test.php on line 15

//ERROR: 42S02:1146:Table 'test.booksa' doesn't exist

PDO::ERRMODE_EXCEPTION: will set the error codes (as with PDO::ERRMODE_SILENT) and en exception of class PDOException will be thrown.

// query

$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$sql = "SELECT * FROM booksa";

$q = $conn->query($sql) or die("ERROR: " . implode(":", $conn->errorInfo()));

$r = $q->fetch(PDO::FETCH_ASSOC);

print_r($r);

//result:

//Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.booksa' doesn't exist' in

//C:\AppServ5\www\test\pdo\test.php:15 Stack trace: #0 C:\AppServ5\www\test\pdo\test.php(15): PDO->query('SELECT * FROM b...') #1 {main} thrown in

//C:\AppServ5\www\test\pdo\test.php on line 15

PDO: Improve Performance with Persistent Connection

Persistent connections are known as way to improve performance. When a persistent connection is requested, PHP checks if there’s already an identical persistent connection from earlier remained open. If it exists, it uses it. What meaning of remained open? Persistent connection are links that do not close when the execution of your script ends. An ‘identical’ connection is a connection that was opened to the same host, with the same username and the same password.

How do use it at PDO? PDO have PDO::ATTR_PERSISTENT. We set in the PDO constructor:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass, array(PDO::ATTR_PERSISTENT => true));

// query

$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$sql = "SELECT * FROM books";

$q = $conn->query($sql) or die("ERROR: " . implode(":", $conn->errorInfo()));

$r = $q->fetch(PDO::FETCH_ASSOC);

print_r($r);

?>

Please, look at line 10.

PDO: Getting Connection Attributes

At several previous tutorial about connection attributes, we talk how to set attributes. Now, we talk about how to get value from connection attributes. We can use getAttribute(). Look this example:

PDO:ATTR_DRIVER_NAME: It returns the name of the underlying database driver.

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass, array(PDO::ATTR_PERSISTENT => true));

echo $conn->getAttribute(PDO::ATTR_DRIVER_NAME);

// result: mysql

?>

Else example:

<?php

// configuration

$dbhost        = "localhost";

$dbname        = "pdo";

$dbuser        = "root";

$dbpass        = "";

// database connection

$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass, array(PDO::ATTR_PERSISTENT => true));

echo $conn->getAttribute(PDO::ATTR_DRIVER_NAME);

echo "<br>";

echo $conn->getAttribute(PDO::ATTR_CLIENT_VERSION);

echo "<br>";

echo $conn->getAttribute(PDO::ATTR_SERVER_VERSION);

?>

Hi, My name is Masud Alam, love to work with Open Source Technologies, living in Dhaka, Bangladesh. I graduated in 2009 with a bachelor’s degree in Engineering from State University Of Bangladesh, I’m also a Certified Engineer on ZEND PHP 5.3, I served my first five years a number of leadership positions at Winux Soft Ltd, SSL Wireless Ltd, CIDA and MAX Group where I worked on ERP software and web development., but now i’m a co-founder and Chief Executive Officer and Managing Director of TechBeeo Software Consultancy Services Ltd. I’m also a Course Instructor of ZCPE PHP 7 Certification and professional web development course at w3programmers Training Institute – a leading Training Institute in the country.

10 comments on “PHP Data Object-PDO Basic
  1. nice tutorial. i like your every post of this site…. keep it up sir. u r helping a lot of people. sharing knowledge is a great thing….. god bless u….

  2. I am very interested in the part with the virtual image retrieved from the blob field. Can be cover.php made more efficient for iterations?

Leave a Reply

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