Hi,

I have almost finished my site in MySQL. However I am often told that it should be in PDO. The problem is I just dont understand what PDO is.

How different is to PHP, what has PDO been introduced? Why is PHP being deprecated just for it to be replaced by another code?

I have read through a number of sites but I just dont understand it.

Take this as an example...how do I convert this into PDO?


Code:
	<?php
$query = "SELECT * FROM users WHERE id = " . intval($_SESSION['userID']) . " LIMIT 1";
if ($result = mysql_query($query)) {
 
                $row = mysql_fetch_array($result);
		{
                ?>