Web lists-archives.com

[PHP] Deprecated features in PHP 5.5.x

Hi people,

How can I use the mysqli function to substitute of mysql ?

I need to change an old script that uses mysql.

The script::


$id = $_GET['id'];
$conexao = mysql_connect('host', 'user', 'pass');


        die("Error: " . mysql_error());

   mysql_select_db($db) or die("Error: " . mysql_error());

$SQL = "SELECT * FROM portfolio WHERE id='$id' ORDER BY id DESC LIMIT 1";

$query = mysql_query($SQL);

while($x = mysql_fetch_array($query)) {


Thanks in advance for any help.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php