Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

21 Zeilen
549 B

vor 3 Jahren
  1. <?php
  2. namespace Api\Model;
  3. use Api\Model\BaseModel;
  4. class OptionsModel extends BaseModel {
  5. //
  6. public function get($option_name){
  7. $res = $this->where(" option_name = '%s' " ,array($option_name))->find();
  8. if ($res) {
  9. return $res['option_value'] ;
  10. }
  11. return false;
  12. }
  13. //
  14. public function set($option_name,$option_value){
  15. $sql = " replace into options (option_name , option_value ) values ('$option_name' , '$option_value')";
  16. return $this->execute($sql);;
  17. }
  18. }