View Single Post
Old 08-07-2011, 06:50 AM  
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
$result = mysql_query("SELECT content.*, content_views.views AS views FROM content, content_views WHERE content_views.content = content.record_num AND content.approved = 2 AND content.enabled = 1 AND record_num<20000 ORDER BY encoded_date");

BTW defining an alias for content_views.views as "views" is pretty pointless in this query.
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote