if ($_GET["q"] != "") { $sql .= " title like '%{$_GET['q']}%' and description like '%{$_GET['q']} %' "; } if ($_GET["project_id"] != "") { if ($_GET["q"] != "") { $sql .= " and "; } $sql .= " project_id = " . $_GET["project_id"]; } if ($_GET["category_id"] != "") { if ($_GET["q"] != "" || $_GET["project_id"] != "") { $sql .= " and "; } $sql .= " category_id = " . $_GET["category_id"]; } $users = NoteData::getBySQL($sql); } else { $users = NoteData::getAll(); } if (count($users) > 0) { // si hay usuarios ?> <table class="table table-bordered table-hover"> <thead> <th>Titulo</th> <th>Proyecto</th> <th>Categoria</th> <th>Creacion</th> <th></th> </thead> <?php