0
這個查詢在ColdFusion中工作正常,但我無法讓它在PHP中工作。 PHP不喜歡我的連接。這兩個查詢有什麼不同?SQL Server與MySQL和PHP與ColdFusion
<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);
?>
PHP不關心你的連接。 ;) – Tomalak
你的意思是他們需要被排除在外? –
不,我的意思是PHP(或ColdFusion,就此而言)將*字符串*發送到數據庫服務器。它不關心它們是否包含連接。 – Tomalak