我如何的Joomla的情況下使用的mysqli bind_param
的Joomla數據庫方法
怎麼會變成這樣的例子應該使用Joomla數據庫的方法來宣佈?
...
$statement->bind_param('s', $like);
$statement->execute();
我如何的Joomla的情況下使用的mysqli bind_param
的Joomla數據庫方法
怎麼會變成這樣的例子應該使用Joomla數據庫的方法來宣佈?
...
$statement->bind_param('s', $like);
$statement->execute();
在Joomla! 3.1,PDO/Sqlite和PDO/Oracle都支持準備好的語句,其他的還沒有實現。
使用「製備的」連接考慮,它的工作是這樣的:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('...')->where('...');
$query->bind(':s', $like);
$db->setQuery($query);
$records = $db->loadObjectList();
似乎把Joomla沒有對mysqli_stmt級的支持。 https://github.com/joomla/joomla-cms/tree/master/libraries/joomla/database – 2013-04-04 13:23:25
感謝您的反饋,我沒有看到任何參考資料。好像我不得不使用另一個解決方法 – fefe 2013-04-04 15:04:49