$query = $search ?
( !$cat ?
"SELECT * FROM games WHERE name LIKE '%".$search."%'" :
"SELECT * FROM games WHERE category='".$cat."' AND name LIKE '%".$search."%'"
):
( $cat ?
"SELECT * FROM games WHERE category='".$cat."'" :
"SELECT * FROM games WHERE name='N/A'"
);
basic_connect($query);