class clsDB { var $c; var $rs; var $status; var $lastSql; var $rowPerPage; var $frRowNum; var $toRowNum; var $numRows; var $DB; function AddNew(){ $this->status = 1; } function Edit(){ $this->status = 2; } function Save(){ //--1 เป็นข้อมูลใหม่ 2 เป็นข้อมูลเดิม --Must Overrided } function Delete(){ //--ใช้เมธอดนี้เพื่อลบข้อมูลเดิมในอ๊อบเจ๊ก เป็นการลบข้อมูลทีละ 1 เรคอร์ด //--ต้องเรียกเมธอดตามลำดับดังนี้ SearchByKey()-->GetRecord()-->Delete() //--Must Overrided } function Close(){ return mysql_free_result($this->rs); } function SetQuery($query){ $this->lastSql=$query; mysql_select_db($this->DB); //echo "-$this->DB="; $this->rs= mysql_query($query); if (!$this->rs){ die("
เกิดข้อผิดพลาด |
---|
" . mysql_errno() . " : " . mysql_error() . " $query |
เกิดข้อผิดพลาด |
---|
" . mysql_errno() . " : " . mysql_error() . " $query |
เกิดข้อผิดพลาด |
---|
" . mysql_errno() . " : " . mysql_error() . " $query |
เกิดข้อผิดพลาด |
---|
ยังไม่ได้สร้างคำสั่ง Select |