I need some help with my code. I have a trouble with connecting to the two different mysql database tables at the same time.
I'm getting an error: Column 'id' in field list is ambiguous IN PHP
Which it have highlight on this line:
$qrytable1="SELECT id, channels, links, categories, streams
FROM channels_list
INNER JOIN chris_channels ON (chris_channels.channels = channels_list.channels)";
Here is the code:
$qrytable1="SELECT id, channels, links, categories, streams
FROM channels_list
INNER JOIN chris_channels ON (chris_channels.channels = channels_list.channels)";
$result1 = mysql_query($qrytable1) or die('Error:<br />' . $qry . '<br />' . mysql_error());
while ($row = mysql_fetch_array($result1))
{
echo "<p id='channels'>".$row["id"]. " " . $row["channels"]. "</p>";
echo "<p id='streams'>".$row["streams"]. "</p>";
}
Can you please help me with how I could correct the error to allow me to connect to the mysql tables?