变量是符合var_dump的字符串,我该如何传递它?我的查询方式是否正确? DB是Msqli
public static function two()
{
$risultato = modOne::one();
var_dump($risultato);
$ident = json_decode($risultato,true);
$db = JFactory::getDBO();
$query=$db->prepare ("SELECT avatar AS memTotal FROM #__comprofiler WHERE id = ?");
$query->bind_param("s", $ident);
$db->setQuery($query);
$resulto = $db->query();
return $resulto->fetch_object()->memTotal;
}
这些回报:
string(3)“751”
致命错误:在非对象上调用成员函数bind_param()