Everytime I try this, the loop kills and I get 0 results.
Is it possible to make a loop within a loop for example:
<?
$sql = "select * from table1";
$result = executequery($sql);
while($line=mysql_fetch_array($result))
{
$product_name = $line['product_name'];
$sql = " select * from table2 where product_name = '$product_name' ";
result2 = executequery($sql);
while($line=mysql_fetch_array($result2))
{
$product_id = $line['product_id'];
echo("$product_name - $product_id<br>");
}}
?>
I know that I could just join the queries, but my actual code has about 4 or 5 tables that are linked together by different parameters, and I'm trying to pull data from all of them where they all share various common values.
Thanks!