1"; } else { $reports_condition = " AND id_report IN (".implode(',',$userreports_id).")"; } $reports = false; if($searchReports) { $sql = "SELECT id_report, name, description FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$reports_condition. " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $sql_count = "SELECT COUNT(id_report) AS count FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$reports_condition; if($only_count) { $totalReports = db_get_value_sql($sql_count); } else { $reports = db_process_sql($sql); $totalReports = db_get_value_sql($sql_count); } } ?>