我在以下 sql 中有错误。
(SELECT shorthand, display, larry_ranking, site_url
FROM larrydb_site_list lsl JOIN larrydb_review lr on
lsl.sid = lr.sid
WHERE display=true AND niche='regular'
ORDER BY larry_ranking DESC Limit 2)
UNION
(SELECT shorthand, display, larry_ranking, site_url
FROM larrydb_site_list lsl JOIN larrydb_review lr on
lsl.sid = lr.sid
WHERE display=true AND niche='regular' AND shorthand='sexier')
我把它放在一行中:
dim rsFav
sSQL = "(SELECT shorthand, display, larry_ranking, site_url FROM larrydb_site_list lsl JOIN larrydb_review lr on lsl.sid = lr.sid WHERE display=true AND niche='regular' ORDER BY larry_ranking DESC Limit 2) UNION (SELECT shorthand, display, larry_ranking, site_url FROM larrydb_site_list lsl JOIN larrydb_review lr on lsl.sid = lr.sid WHERE display=true AND niche='regular' AND shorthand='sexier')"
Set rsFav = objConn.Execute(sSQL)
我得到这个错误..
ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal.
/sandbox/inc_fav_sites.asp,第 29 行
我认为问题出在 sql 字符串中......不是在 asp 代码中......因为我没有碰它
这条线 29<a href="http://livecamdeals.com/review.asp?sitename=<%=LCase(rsFav(""))%>"></a>
对不起,我不知道asp编程但是sql ..