In short:
I have problems with making a query in 3 tables.
When making a query in just the 2 of them, there is no problem, but adding the 3. table, then everything goes wrong.
here is the code so far.:
$foresp = mysql_query("SELECT users.id, users.navn, products.id, products.navn, poll.id, poll.productid, poll.vote FROM musers, products, poll WHERE musers.navn='$user' AND poll.produktid=products.id");
while($data = mysql_fetch_array($foresp)){
echo "<table border=0><tr>";
echo"<td>". $data[3]."</td>";
echo"<td>". $data[7]."</td>";
echo"<td>". $data[1]."</td>";
echo "</tr></table>";
}
If I remove everything concerning the poll-table it works.
But that is not the purpose ;-).
The polltable looks like this:
id - key
userid
productid
vote
You know what I mean?
Hope someone can help me here.
Thanks