50 |
if (isset($type)) { |
if (isset($type)) { |
51 |
if ($type == "n") { |
if ($type == "n") { |
52 |
$sql_where .= " and type='n'"; |
$sql_where .= " and type='n'"; |
53 |
|
} elseif ($type == "e") { |
54 |
|
$sql_where .= " and type='e'"; |
55 |
} |
} |
56 |
} |
} |
57 |
|
|
66 |
$sql="select |
$sql="select |
67 |
id,upper(title) as title,town_date,body,more,pdf, |
id,upper(title) as title,town_date,body,more,pdf, |
68 |
(date-now()::date) as comming |
(date-now()::date) as comming |
69 |
from news $sql_where order by date desc $sql_limit"; |
from news $sql_where order by priority desc,date desc $sql_limit"; |
70 |
# print "$sql"; |
print "$sql"; |
71 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
72 |
$sth->execute(); |
$sth->execute(); |
73 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |