I have a table with field 'c_number' as primary key. now i have used this primary key as foreign key in two tables: calls and billing. can anyone help me why this query is not working
$q="select c_number, type, billing.days from calls, billing where calls.c_number=billing.c_number group by c_number";
$r=mysql_query($q);
while($row=mysql_fetch_array($r))
{
echo $row['days'];
}
the query doesnot work and gives me error as:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\vas1\b.php on line 61
line 61:
while($row=mysql_fetch_array)