I'm joining 3 tables at the id field in mySQL. I get an error.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/shabangw/public_html/invoices.php on line 51
This is my query:
$query = "SELECT currprojects.companyName, contracts.dueDate, invoices.amount, currprojects.jobSummary, invoices.invoiceDate, invoices.paid FROM currProjects, contracts, invoices WHERE currprojects.id = contracts.id AND currprojects.id = invoices.id AND invoices.id = contracts.id";
Does anything look wrong? How can I make it work? I've never joined 3 tables. Only 2 and I followed the same logic that I would for 2 but added a little more. Help me if you can.