How to do a MYSQL query with an array in PHP? -
how can query database using results of prior query if in array? below have far.
$query = "select * searchtestdb engname in ( select synonyms.synonym words left join synonyms on synonyms.word_id = words.word_id word '%$searchbox%') "; while($result = mysql_fetch_array($query)) { echo $result['engname']; echo "<br> "; echo "<br> "; }
how can $result['engname'] , query again? i'm thinking like
select * searchtestdb engname '%$result['engname']%';
but doesn't work. ideas?
while($result = mysql_fetch_array($query)) { $query2 = "select * searchtestdb engname '%".$result['engname']."%';"; $result2 = mysql_query($query2); while($row = mysql_fetch_array($result2)) { echo $row["somthing"]; } }
Comments
Post a Comment