9dian房间guan理系统(6)
2023-07-17 来源:百合文库
* @param int $priId
* @param string $fields
* @return mixed
*/
public static function findById($tabName,$priId,$fields='*'){
$sql='SELECT %s FROM %s WHERE id=%d';
return self::getRow(sprintf($sql,self::parseFields($fields),$tabName,$priId));
}
/**
* 执行普通查询
* @param unknown $tables
* @param string $where
* @param string $fields
* @param string $group
* @param string $having
* @param string $order
* @param string $limit
* @return Ambigous <unknown, unknown, multitype:>
* @param string $fields
* @return mixed
*/
public static function findById($tabName,$priId,$fields='*'){
$sql='SELECT %s FROM %s WHERE id=%d';
return self::getRow(sprintf($sql,self::parseFields($fields),$tabName,$priId));
}
/**
* 执行普通查询
* @param unknown $tables
* @param string $where
* @param string $fields
* @param string $group
* @param string $having
* @param string $order
* @param string $limit
* @return Ambigous <unknown, unknown, multitype:>