You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
549 B

<?php
namespace Api\Model;
use Api\Model\BaseModel;
class OptionsModel extends BaseModel {
//
public function get($option_name){
$res = $this->where(" option_name = '%s' " ,array($option_name))->find();
if ($res) {
return $res['option_value'] ;
}
return false;
}
//
public function set($option_name,$option_value){
$sql = " replace into options (option_name , option_value ) values ('$option_name' , '$option_value')";
return $this->execute($sql);;
}
}