Prova questo.
[CODE=php]
<?php
class db {
private $connessione = null;
public function __construct()
{
$host = 'localhost';
$db = 'mt1kibgh_db';
$user = 'mt1kibgh_root';
$password = 'password';
try
{
$this->connessione = new PDO('mysql:host='.$host.';dbname='.$db, $user, $password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") );
//echo "Connessione a MySQL tramite PDO effettuata.";
//$connessione = null;
}
catch(PDOException $e)
{
echo $e->getMessage();
}
}
public function connect()
{
return $this->connessione;
}
}
$Nome = "jjjjjjjjjjjjjj";
$a = new db();
$b = $a->connect()->quote('%'.$Nome.'%');
[/CODE]