http://www.xataface.com/
http://beckjottings.blogspot.com/search ... results=20
Xataface
預設值的做法
tables/table_name/fields.ini
資料庫欄位也需設為 NULL 才可以
tables/table_name/table_name.php
代碼: 選擇全部
[mod_stamp]
widget:type=hidden
timestamp=update
[mod_users]
widget:type=hidden
validators:required=0
tables/table_name/table_name.php
代碼: 選擇全部
<?php
class tables_acc_type{
function beforeInsert(&$cecord){
$record->setValue('key_users', $_SESSION['UserID']);
$record->setValue('key_stamp', now());
}
function beforeSave(&$record){
$record->setValue('mod_users', $_SESSION['UserID']);
}
}
?>