我需要一些幫助來了解CodeIgniter的掛鉤邏輯,以適應我的需要的代碼。CodeIgniter掛鉤的活動記錄庫
頁:http://ellislab.com/codeigniter/user-guide/general/hooks.html
事實上,我不得不從這個修改數據庫驅動程序爲MySQL:
function _from_tables($tables)
{
if (! is_array($tables))
{
$tables = array($tables);
}
return '('.implode(', ', $tables).')';
}
這樣:
function _from_tables($tables)
{
if (! is_array($tables))
{
$tables = array($tables);
}
return implode(', ', $tables);
}
我做這個mod使用使用活動記錄庫的UNION查詢。
有人可以幫我做一個掛鉤,以防止在更新核心系統時我的修改被覆蓋嗎?
在此先感謝!
我想你要找的定製庫,而不是掛鉤的說明。請參閱http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html - >用您自己的版本替換庫。您可以擴展數據庫驅動程序並用您自己的自定義版本替換一兩個方法。 –