I need to get info from 2 tables in one query, I searched for it on google and it came up with joins? I got this code
mysql_query("SELECT code, url FROM apilinks, links WHERE apilinks.code='$code' and links.code='$code'");
but it doesn't seem to work, it outpus this mysql error
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/codyl/public_html/projects/tests/tirl/code.php on line 18
I need to have it find url and code, in both the links table and the apilinks table, because the url has a get variable, and 'apilinks' is setup differently than 'links' so it will have the same looking url but it has to check both tables