[drupal-devel] Critical error in use of timestamp!

Carl McDade carl_mcdade at yahoo.com
Thu Mar 17 11:58:39 UTC 2005

I admitted it was me . I did not have drupal-devel address set which is
why I was using the reply button. Moving on...

There is also a problem with using this kind of syntax in the SQL that
also may cause problems in the future. "timestamp" use for identification

$sql = "SELECT DISTINCT(n.nid), f.tid, n.title, n.sticky, u.name, u.uid,
n.created AS timestamp, n.comment AS comment_mode,
l.last_comment_timestamp, IF(l.last_comment_uid, cu.name,
l.last_comment_name) as last_comment_name, l.last_comment_uid,
l.comment_count AS num_comments FROM {node} n ". node_access_join_sql()
.", {node_comment_statistics} l, {users} cu, {term_node} r, {users} u,
{forum} f WHERE n.status = 1 AND l.last_comment_uid = cu.uid AND n.nid =
l.nid AND n.nid = r.nid AND r.tid = $check_tid AND n.uid = u.uid AND
n.nid = f.nid AND ". node_access_where_sql();

Carl McDade

More information about the drupal-devel mailing list