getting array into query_posts()…
-
having this query:
$query = "Select MLS_Number from idx WHERE City = 'ALAMO'"; $result1 = Mysql_query($query) or die("<font color=\"#FF0000\">Query Error</font>" . mysql_error()); while($row = mysql_fetch_array($result1, MYSQL_ASSOC)) { $MLS_Number = $row['MLS_Number']; $query2 = "select post_id from wp_postmeta where meta_key = '_option_8' and meta_value = '$MLS_Number'"; $result2 = Mysql_query($query2) or die("<font color=\"#FF0000\">Query Error</font>" . mysql_error()); while($row = mysql_fetch_array($result2, MYSQL_ASSOC)) { $Post_id = $row['post_id']; $Uquery = "update wp_term_relationships set term_taxonomy_id = 10 where term_taxonomy_id = 11 and object_id = $Post_id"; $result = Mysql_query($Uquery) or die("<font color=\"#FF0000\">Query Error</font>" . mysql_error()); // echo $MLS_Number." -- "; // echo $Post_id." | "; } }
i’ll retrieve 2 listings, for instance post #s 21 and 30… (conceivably could return many)
the value of $Post_id would be “2130”…
no matter what i do, i can’t get the array into query_posts(); to run the loop.
can someone please help? i’m not good with arrays, implode etc, anyway.
thanks so much!
G
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘getting array into query_posts()…’ is closed to new replies.