I'm a novice at PHP to do MySQL manipulations. When the problem is boiled down, the database has 2 columns - city, borough. Some cities have a borough and the field is populated. Some cities do not, and the borough field is null. I only want to retrieve data into an array if the borough field is populated. My code looks like:
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)){
if ( what_column_identifier_goes_here? != null ){
/* For each row containing borough_data, put it in the return array */
$row_array['city'] = $row['borough'];
array_push($return_arr,$row_array);
}
}
I tried searching for an answer, but I couldn't figure out good terms. From the search, I suspect this is deprecated. For the moment, I just want to get something working and then I'll learn PDO and make a whole bunch of changes in several scripts.
Thanks for any help.