Skip to main content
Changed code for D6
Source Link
David Thomas
  • 21.9k
  • 2
  • 33
  • 68

The node created and updated timestamps are stored in the base "node" table.

e.g

$result = db_selectdb_query('node',"SELECT 'n')
->fields('n'nid, array('nid'title, 'title'changed, 'created',created 'changed')FROM {node} ORDER BY nid ASC LIMIT 10");
->orderBy('nid')
->rangewhile(0,10)
->execute$row = db_fetch_object($result);
){
foreach($result as // drupal_set_message($row->title){;
  drupal_set_message('<pre>'.print_r($row,1).'</pre>');
}

The node created and updated timestamps are stored in the base "node" table.

e.g

$result = db_select('node', 'n')
->fields('n', array('nid', 'title', 'created', 'changed'))
->orderBy('nid')
->range(0,10)
->execute();

foreach($result as $row){
  drupal_set_message('<pre>'.print_r($row,1).'</pre>');
}

The node created and updated timestamps are stored in the base "node" table.

e.g

$result = db_query("SELECT nid, title, changed, created FROM {node} ORDER BY nid ASC LIMIT 10");

while($row = db_fetch_object($result)){
  // drupal_set_message($row->title);
  drupal_set_message('<pre>'.print_r($row,1).'</pre>');
}
Added code sample
Source Link
David Thomas
  • 21.9k
  • 2
  • 33
  • 68

The node created and updated timestamps are stored in the base "node" table.

e.g

$result = db_select('node', 'n')
->fields('n', array('nid', 'title', 'created', 'changed'))
->orderBy('nid')
->range(0,10)
->execute();

foreach($result as $row){
  drupal_set_message('<pre>'.print_r($row,1).'</pre>');
}

The node created and updated timestamps are stored in the base "node" table.

The node created and updated timestamps are stored in the base "node" table.

e.g

$result = db_select('node', 'n')
->fields('n', array('nid', 'title', 'created', 'changed'))
->orderBy('nid')
->range(0,10)
->execute();

foreach($result as $row){
  drupal_set_message('<pre>'.print_r($row,1).'</pre>');
}
Source Link
David Thomas
  • 21.9k
  • 2
  • 33
  • 68

The node created and updated timestamps are stored in the base "node" table.