From: Andrew Dolgov Date: Sun, 21 Aug 2005 10:56:27 +0000 (+0100) Subject: db schema updated, psql feed fetch X-Git-Tag: 0.1~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6f428bc5048a30bb406ab0e896e54d3d81a83e06;p=tt-rss.git db schema updated, psql feed fetch --- diff --git a/backend.php b/backend.php index b4ec48c1..7d072fc8 100644 --- a/backend.php +++ b/backend.php @@ -1,19 +1,24 @@ "; $lnum = 0; - foreach ($feeds as $feed) { + while ($line = pg_fetch_assoc($result)) { + + $feed = $line["title"]; + $class = ($lnum % 2) ? "even" : "odd"; // if ($lnum == 2 || $lnum == 0) $feed = "$feed"; diff --git a/ttrss_schema.sql b/ttrss_schema.sql index 589f9393..58d4e5bb 100644 --- a/ttrss_schema.sql +++ b/ttrss_schema.sql @@ -14,10 +14,11 @@ insert into ttrss_feeds (id,title,feed_url) values (4, 'Planet Ubuntu', 'http:// insert into ttrss_feeds (id,title,feed_url) values (5, 'Planet GNOME', 'http://planet.gnome.org/rss20.xml'); insert into ttrss_feeds (id,title,feed_url) values (6, 'Monologue', 'http://www.go-mono.com/monologue/index.rss'); - create table ttrss_entries (id serial not null primary key, feed_id int references ttrss_feeds(id), entry_time timestamp not null, headline varchar(250) not null, guid varchar(300) not null unique, - content text not null); + content text not null + unread boolean default true); +