php代码
//万能单条件查询函数,由lisan制作
//函数代码请放于位于项目目录下Common/Common.php中
function Getx2x($table,$fields,$id,$str){
$aa=M($table);
if(empty($str)){
$expression='getByid';
}else{
$expression='getBy'.$str;
}
$thisaa=$aa->field($fields)->$expression($id);
$bb=explode(',',$fields);
if(count($bb)<=1){
return $thisaa[$fields];
}else{
return $thisaa;
}
}
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号