12345678910111213141516171819202122232425262728293031323334 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- class product extends DooModel {
-
- public $pid;
- public $title;
- public $typeid;
-
- public $_table = 'CLD_product';
- public $_primarykey = 'pid';
- public $_fields = array ('pid', 'title','typeid');
-
- public function checkUser($uid,$passwork){
- return $this->find ( array ('where' => "uid= '".$uid."' and passwork = '".addslashes($passwork)."'", 'asArray' => TRUE ) );
- }
-
- public function getProudct() {
- return $this->find ( array ('desc' => 'pid', 'asArray' => TRUE ) );
- }
- function getProductById($pid = 0 ) {
-
- return $this->find ( array ( 'where' => 'pid=' . $pid, 'asArray' => TRUE ) );
- }
-
- public function getUserByIdList($puid){
- return $this->find ( array ('where' => "uid= '".$puid."'", 'asArray' => TRUE ) );
- }
-
- }
- ?>
|