includes/pageprocess.php
changeset 542 5841df0ab575
parent 541 acb7e23b6ffa
child 557 26479224936a
equal deleted inserted replaced
541:acb7e23b6ffa 542:5841df0ab575
  1176       
  1176       
  1177     }
  1177     }
  1178     else
  1178     else
  1179     {
  1179     {
  1180       
  1180       
  1181       $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\'' . $this->page_id . '\' AND namespace=\'' . $this->namespace . '\';');
  1181       $q = $db->sql_query('SELECT t.page_text, t.char_tag, l.time_id FROM '.table_prefix."page_text AS t\n"
       
  1182                         . "  LEFT JOIN " . table_prefix . "logs AS l\n"
       
  1183                         . "    ON ( l.page_id = t.page_id AND l.namespace = t.namespace )\n"
       
  1184                         . "  WHERE t.page_id='$this->page_id' AND t.namespace='$this->namespace'\n"
       
  1185                         . "  ORDER BY l.time_id DESC LIMIT 1;");
  1182       if ( !$q )
  1186       if ( !$q )
  1183       {
  1187       {
  1184         $this->send_error('Error during SQL query.', true);
  1188         $this->send_error('Error during SQL query.', true);
  1185       }
  1189       }
  1186       if ( $db->numrows() < 1 )
  1190       if ( $db->numrows() < 1 )