This question already has an answer here:
I now am getting this in my error log after fixing another problem. I've looked over everything on stackoverflow and all I come come up with is to get it to display an error, problem is I can't find where the error displays, so I can't troubleshoot it that way. Can anyone help give me some guidance? I'm not trying to do a duplicate, I'm really just trying to understand what is going on, sorry if this is misplaced (and if it is please let me know!).
This is the error:
[Wed Mar 27 01:36:41 2013] [error] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /nas/wp/www/cluster-1434/XXXXXXX/wp-content/themes/mytheme/functions.php on line 574
[Wed Mar 27 01:36:14 2013] [error] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /nas/wp/www/staging/XXXXXXX/wp-content/themes/mytheme/functions.php on line 572
This is line 572:
$ll = mysql_fetch_array($getLL);
This is line 574:
$cou = mysql_fetch_array($getCount);
Here is the code:
<?php
$con = conDB();
$x = 0;
//if ( false === ( $zip = get_transient( 'distinct_zips' ) ) ) {
$getZips = mysql_query("SELECT Distinct(meta_value) FROM wp_postmeta WHERE meta_key='_gmap_zip'",$con);
//$zip = mysql_fetch_array($getZips);
// set_transient('distinct_zips', $zip, 60*5);
//}
while($zip = mysql_fetch_array($getZips)){
$getLL = mysql_query("SELECT * FROM zipcodes WHERE zip=".$zip['meta_value'],$con);
$ll = mysql_fetch_array($getLL);
$getCount = mysql_query("SELECT Count(*) FROM wp_postmeta WHERE meta_key='_gmap_zip' AND meta_value=".$zip['meta_value'],$con);
$cou = mysql_fetch_array($getCount);
$zipvalue = $zip['meta_value'];
$getNewest = mysql_query('SELECT * FROM wp_postmeta WHERE meta_key="_gmap_zip" AND meta_value="'.$zipvalue.'" LIMIT 5',$con);
if(strlen($ll['lat'])){
?>
Thanks in advance for all your help!
</div>