This query works fine with ColdFusion, yet I can't get it to work in PHP. The PHP doesn't like my joins. What is different in the two queries?
<cfquery name="getArt" datasource="mssqlcf_PDartist1">
select * from artwork a
join Categories b on (b.CID = a.CID)
join SubCategories c on (c.CID = b.CID and c.SCID = a.SCID)
where AID = #AID#
order by DisplayOrder
</cfquery>
<?php
$dbname = 'pdartist2';
$table = 'artwork';
$result = mysql_query("SELECT * from artwork") or die(mysql_error());
a join Categories b on (b.CID = a.CID)
join SubCategories c on (c.CID = b.CID and c.SCID = a.SCID)
where AID = $AID
order by DisplayOrder
mysql_free_result($result);
?>