<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Can you post your Drupal query? Hard to troubleshoot w/o the original
code.<br>
<br>
nan wich wrote:
<blockquote cite="mid:603948.31871.qm@web180304.mail.gq1.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 12pt; color: rgb(192, 0, 0);">
<div>I have the following query, which works fine in PhpMyAdmin, but
Drupal upchucks on it. Why?</div>
<div> </div>
<div><font color="#000000">SELECT nc.nid, n.title, n.created,
nc.daycount AS views_today, nc.totalcount AS total_views, <br>
(SELECT COUNT(*) FROM comments c WHERE c.timestamp >= 1270699200
AND c.nid=nc.nid) AS comments_today, <br>
cs.comment_count <br>
FROM node_counter nc <br>
INNER JOIN node n ON n.nid=nc.nid <br>
LEFT JOIN node_comment_statistics cs ON cs.nid=nc.nid <br>
WHERE nc.daycount > 0 <br>
ORDER BY nc.daycount DESC</font></div>
<div> </div>
<div>Yes, in Drupal, I do put the brackets around the table names.</div>
<div> </div>
<div>The error message says there's a problem at " AS
comments_today, cs.comment_count FROM...".<br>
</div>
<p><font color="#ff007f"
face="bookman old style, new york, times, serif" size="4"><em><strong>Nancy
E. Wichmann, PMP</strong></em></font></p>
<p><font face="arial, helvetica, sans-serif"><span
style="font-size: 11pt; color: rgb(99, 36, 35); font-family: 'Arial','sans-serif';">Sometimes
the questions are complicated and the answers are simple. - Dr. Suess</span></font></p>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Aaron Winborn
Advomatic, LLC
<a class="moz-txt-link-freetext" href="http://advomatic.com/">http://advomatic.com/</a>
Drupal Multimedia available in September!
<a class="moz-txt-link-freetext" href="http://www.packtpub.com/create-multimedia-website-with-drupal/book">http://www.packtpub.com/create-multimedia-website-with-drupal/book</a>
My blog:
<a class="moz-txt-link-freetext" href="http://aaronwinborn.com/">http://aaronwinborn.com/</a></pre>
</body>
</html>