'$anode->teaser' returns nothing.
$sql = "SELECT node.teaser" gets a error.
what can be the problem?
The query fails because the teaser is in the 'node_revisions' table, not in the 'node' table.
Sorry, I didn't get it. Can you help me to make this work:
$sql = "SELECT node.title, node.nid FROM node WHERE type='page' ORDER BY node.created DESC LIMIT 50" ; $output .= "<ul>"; $result = db_query($sql); while ($anode = db_fetch_object($result)) { $output .= "<li>".l($anode->title, "node/$anode->nid")."</li>"; $output .= "<li>".l($anode->teaser, "node/$anode->nid")."</li>"; } $output .= "</ul>"; $output .='<div class="more-link">'.l('more', 'node/'.$anode->nid).'</div>'; print $output;
Thanks.
I replied to your other post here: http://drupal.org/node/322016#comment-1062358
you're not returning the teaser from the database
---------------------------------------------------------------- IB Community Theme http://communitytheme.ibo.org Spun Designs http://www.spundesigns.net Millwood Online http://www.millwoodonline.co.uk
Comments
The query fails because the
The query fails because the teaser is in the 'node_revisions' table, not in the 'node' table.
Sorry, I didn't get it. Can
Sorry, I didn't get it. Can you help me to make this work:
Thanks.
I replied to your other post
I replied to your other post here: http://drupal.org/node/322016#comment-1062358
you're not returning the
you're not returning the teaser from the database
----------------------------------------------------------------
IB Community Theme http://communitytheme.ibo.org
Spun Designs http://www.spundesigns.net
Millwood Online http://www.millwoodonline.co.uk