/[health_html]/inc/newsShow.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /inc/newsShow.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by ravilov, Tue Sep 25 15:38:04 2001 UTC revision 1.9 by ravilov, Sat Sep 29 12:56:31 2001 UTC
# Line 32  Line 32 
32                  global $dbh, $spec, $isMed;                  global $dbh, $spec, $isMed;
33                  $arts = array();                  $arts = array();
34                  if (!$offset) $offset = 0;                  if (!$offset) $offset = 0;
35                  $sql = "SELECT DISTINCT news.news_id, title, lead, title_pic, title_alt, title_pos, url, url_title, d_change, author_pic, author_alt, author_info, ord FROM news".(isset($cat)?", cat_news":"").($spec?", spec_news":"")." WHERE (".($isMed?"":"NOT ")."plivamed)";                  $sql = "SELECT DISTINCT news.news_id, title, lead, title_pic, title_alt, title_pos, url, url_title, d_orig, author_pic, author_alt, author_info, ord FROM news".(isset($cat)?", cat_news":"").($spec?", spec_news":"")." WHERE (".($isMed?"":"NOT ")."plivamed)";
36                  if ($id > 0) $sql .= " AND (news.news_id = $id)";                  if ($id > 0) $sql .= " AND (news.news_id = $id)";
37                  if ($cat) $sql .= " AND ((category = '$cat') OR ((cat_news.cat_id = '$cat') AND (cat_news.news_id = news.news_id)))";                  if ($cat) $sql .= " AND ((category = '$cat') OR ((cat_news.cat_id = '$cat') AND (cat_news.news_id = news.news_id)))";
38                  if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)";                  if ($spec) $sql .= " AND (spec_news.news_id = news.news_id) AND (spec_news.spec_id = $spec)";
39                  $sql .= " ORDER BY d_change DESC";                  $sql .= " ORDER BY d_orig DESC";
40                  if ($limit) $sql .= " LIMIT $limit OFFSET $offset";                  if ($limit) $sql .= " LIMIT $limit OFFSET $offset";
41                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
42                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.26