示例#1
0
 /**
  * {@inheritDoc}
  */
 function get_row_count($table_name)
 {
     $table_status = $this->get_table_status($table_name);
     if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM') {
         return $table_status['Rows'];
     }
     return parent::get_row_count($table_name);
 }
示例#2
0
    /**
     * Get the data for all reportee from the database
     *
     * @param	array	$reportee_ids	Array with the user ids of the reportees
     *
     * @return	array		Returns an array with the reportee data
     */
    protected function get_reportee_data(array $reportee_ids)
    {
        $reportee_ids = array_unique($reportee_ids);
        $reportee_data_list = array();
        $sql = 'SELECT user_id, username, user_colour
			FROM ' . USERS_TABLE . '
			WHERE ' . $this->db->sql_in_set('user_id', $reportee_ids);
        $result = $this->db->sql_query($sql);
        while ($row = $this->db->sql_fetchrow($result)) {
            $reportee_data_list[$row['user_id']] = $row;
        }
        $this->db->sql_freeresult($result);
        return $reportee_data_list;
    }