我正在尝试使用PDO,我想知道下面的代码是否正确,因为它给了我一个错误:mysql_real_escape_string(): [2002] A connection attempt failed becauseconnected host has failed to respond.public function searchQuotes() $search = mysql_real_escape_string']))
$quotes->searchQu
我已经从mysqli类扩展了我的数据库模型,但是我不希望每次实例化一个新模型时都重新连接它,因为它确实减慢了整个脚本的速度。public function __construct() {
parent::__construct(MySQL_HOST, MySQL_USER, MySQL_PASS, MySQL_DATABASE/ i don't think it's relevant but i'll leave it here just in ca