2011年9月3日 星期六

utycx更新紀錄

核心更新重大突破
今天sxsbsae_class.php的sxs_base這個class,增加了rsInfo這個method
用來讀取資料表中的單一筆資料,甚至單一欄的內容
開始把school_base, stud_base, teacher_base, teacher_post, one_gclass轉成用rsInfo來讀取,簡化程式碼
後來發現
if(!$tea_sn) $tea_sn=$this->rsInfo("sxs_teacher_post", "tea_year='$gc_year' and tea_seme='$gc_seme' $os_where order by tea_sn",'tea_sn');
就可以把原來
if(!$tea_sn) $tea_sn=sxs_teacher::one_tea($gc_year , $gc_seme,$os);
取代掉
這樣也省略了
require_once('teacher_class.php')這一列
速度明顯變快
也不會遞迴呼叫了

stud_base('127') 可以取得stud_sn=127的個人資料
如果我想要取的 stud_id = '100002' 的個人資料就不能用 stud_base
要用
rsInfo('sxs_stud_base'," stud_id = '100002'");

沒有留言: