diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2006-08-25 10:45:56 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2006-08-25 10:45:56 +0000 |
commit | 15fe10f53b83794d42ff5d59b9006e21cc3f7652 (patch) | |
tree | 9f879830c8fc601df2ffbb2f5ba01ae77e64d8b5 /contrib/feed-browser/includes/functions.inc | |
parent | 219969bfd684be1d202d581830107b98dd1c9165 (diff) |
feed-browser: FIX: feed structure was changed - database NEED to be rebuilt
- package.p_feed is now int -> feeds.f_id
Diffstat (limited to 'contrib/feed-browser/includes/functions.inc')
-rw-r--r-- | contrib/feed-browser/includes/functions.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/feed-browser/includes/functions.inc b/contrib/feed-browser/includes/functions.inc index 4edf3f4369..77afca6f5e 100644 --- a/contrib/feed-browser/includes/functions.inc +++ b/contrib/feed-browser/includes/functions.inc @@ -79,15 +79,20 @@ function insert_feeds ($db) if(isset($feeds)) { + $id = 1; + foreach($feeds as $distro) { foreach($distro['feeds'] as $feed) { - sqlite_query($db, "INSERT INTO feeds (f_name, f_uri) VALUES + sqlite_query($db, "INSERT INTO feeds (f_id, f_name, f_uri) VALUES ( + {$id}, '{$distro['distro_name']} {$distro['distro_version']} {$feed['name']}', '{$distro['feed_base_url']}{$feed['url']}' )"); + + $id++; } } } @@ -166,7 +171,7 @@ function pkgdetails ($package) { $result = db_query("SELECT * FROM packages,feeds WHERE (packages.p_name='$package' OR packages.p_provides='$package') - AND feeds.f_name = packages.p_feed + AND feeds.f_id = packages.p_feed ORDER BY packages.p_version DESC, feeds.f_name ASC, packages.p_arch DESC "); // display first result |