PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- class cms_iu_table{
- public $trsall;
- function trs($mysql,$sis){
- $this->trsall='';
- $num=0;
- foreach($this->tr as $key=>$value){
- if($sis=='mysql'){
- } else {
- }
- $this->trsall=$this->trsall."`{$key}`='{$value}'";
- $num=$num+1;
- if($numtr!=$num){ $this->trsall=$this->trsall.", "; }
- }
- }
- function mysqli_insert($mysql){
- $this->trs($mysql,'mysqli');
- }
- function mysql_insert($mysql=NULL){
- $this->trs($mysql,'mysql');
- }
- function mysqli_update($where,$mysql){
- $this->trs($mysql,'mysqli');
- }
- function mysql_update($where,$mysql=NULL){
- $this->trs($mysql,'mysql');
- return mysqi_query("UPDATE `{$this->name}` SET {$this->trsall} where {$where}",$mysql);
- }
- }