function show_join() {
//$result = mysql_query("SELECT * FROM Persons");
$userid = $this->session->userdata('user_id');
$result = $this->db->query("SELECT swap.swapid, swap.offering FROM swap, users_swap WHERE users_swap.user_id = '$userid' AND users_swap.swap_id = swap.swapid");
echo "<table border='1'>
<tr>
<th>swapid</th>
<th>offering</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['swap.swapid'] . "</td>";
echo "<td>" . $row['swap.offering'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
The error was,
Message: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
?
tnx in advanced.