hey guys.. i have trying for 2 weeks now to connect 2 tables
in the way that i need them to print out..

to understand the table structure please see attachment 001

Now... i have managed to join both table but the problem is that each time i insert a new recipe in creates a new completley seperate table and i want all the recipes that belong to "some recipe website" to apear in the same table of the right recipe website.

to understand my problem please see atachment 002

in attachment 002 its also clear to see i need to also show empty recipe websites meaning ones i have yet to submit to otherwise it would easily done with one table and no mass :)

I hope i didnt drove you mad about attachment.. just tought it would be easier to explain that way..

Really need some help here guys so plz (if you can) take a second to help me

Insertion is the problem or you are not able to display things in expected way???

each time i insert a new recipe in creates a new completley seperate table and i want all the recipes that belong to "some recipe website" to apear in the same table of the right recipe website.

Also I do not understand your above statement. What do you mean by "creates a new completely separate table"?

sorry - i mean every insertion creates a new raw.. the data is entered into the database using a form and that part works great..

My problem is displaying the data correctly.. (view attachment 02)

Show the sql statements you are using.

g'eez... my select statement doesetn work well as i explained in attachment 02..
those are only 2 lines of code so i am hopeing to start fresh... with a clean way of thinking of it..

This is not compiled code, change column name and others syntax.

<?PHP
$query="select websitename,websitelink from receipe_sites order by websiterank desc";

$web=mysql_query($query);
echo "\n<table>";

while($rowweb=mysql_fetch_assoc($web))
{

   $query="select recipeid,recipename, reciepelink, recipeby from receipe_submit where websitename='{$rowweb['websitename']}' order by websiterank desc";

   $rec=mysql_query($query);

   echo "\n<tr><td><b>{$rowweb['websitename']}</b></td></tr>";

   echo "\n<tr>";
   echo "<td>Name</td>";
   echo "<td>Link</td>";
   echo "<td>By</td>";
   echo "</tr>";

   while($rowrec=mysql_fetch_assoc($rec))
   {
      echo "\n<tr>";
      echo "<td>{$rowrec['recipename']}</td>";
      echo "<td>{$rowrec['recipelink']}</td>";
      echo "<td>{$rowrec['recipeby']}</td>";
      echo "</tr>";

   }

   echo "\n<tr><td><b>&nbsp</td></tr>";
}


?>

wow, thanks a lot for your answer.. going to try it now :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.