标签: php sql
$stage=$this->db->query("SELECT DISTINCT stages FROM ticket WHERE status='r'")->row_array(); $id=(int)$stage['stages'];