$field=$userVo->field;
$order=$userVo->order;
$selectQry = $this->_util->db->select()->from(array('M'=>$this->_name))
->join(array('MX'=>TBL_MEDICATIONS_XREF),
'M.medication_id = MX.medication_id')
->join(array('U'=>TBL_USERS),
'U.user_id = MX.user_id',array('U.identifier','U.email','U.mobile_number','U.first_name','U.last_name'))
->where('MX.user_id = ?',mysql_escape_string($userId));
if (!empty($field) && !empty($order))
{
// if(($field=="notes") || ($field=="rx_number"))
if($field=="rx_number")
$selectQry->order("MX.$field $order");
if($field=="nick_name")
$selectQry->order("M.$field $order");
}
$medications = $this->_util->db->fetchAll($selectQry);
if($field=="rx_number")
条件不行,是什么原因?