1"; } else { $graphs_condition = " AND id_graph IN (".implode(',',$usergraphs_id).")"; } $fromwhere = "FROM tgraph WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$graphs_condition; $limitoffset = "LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $sql_count = "SELECT COUNT(id_graph) AS count $fromwhere"; if ($only_count) { $totalGraphs = db_get_value_sql($sql_count); } else { $sql = "SELECT id_graph, name, description $fromwhere $limitoffset"; $graphs = db_process_sql($sql); if($graphs !== false) { $totalGraphs = db_get_value_sql($sql_count); } } } ?>