Hi, I have a quick question. Im trying to query and and get back all results and not get the fields that are empty. I tried this already: $sql = "SELECT area, state, cities FROM $tbl_name WHERE (state = '$value') AND (cities != 'NULL') LIMIT $start, $limit"; HTML: Basically, I want to get area, state, and cities for a certain state but I dont want the rows where there are no cities. I want to leave the rows that are completely empty. Thanks.
What's that query returning? Your 'NULL' is incorrect. Also, you don't need parenthesis around single conditions in your WHERE clause. Only use them if you want to group conditions Ex: WHERE (state = '$value' AND cities != NULL). I would try it like this: $sql = " SELECT area, state, cities FROM $tbl_name WHERE state = '$value' AND cities <> NULL LIMIT $start, $limit";