postgresql7.2
update na_sources
set last_scanned = now(),
title = :title,
link = :link,
description = :description
where source_id = :source_id
where last_scanned < (now() - '00:48:00'::time)
select source_id,
feed_url,
last_modified
from na_sources
$time_limit
order by last_scanned asc
$limit_sql
limit $limit
select na_source__new (
null, -- object_id
:feed_url,
:link,
:channel_title,
:description,
:last_modified,
'1',
:package_id,
:user_id,
:creation_ip
)
now()
:pub_date
select na_item__new (
:source_id,
:link,
:guid,
boolean :permalink_p,
:title,
:description,
:content_encoded
);
update na_sources
set link = :link,
title = :title,
description = :description,
updates = (updates + 1),
last_scanned = now(),
last_modified = now(),
last_modified_stamp = now()
where source_id = :source_id
select na_item__new (
:source_id,
:link,
:guid,
:original_guid,
boolean :permalink_p,
:title,
:description,
:content_encoded,
:author,
$pub_date_sql
);
select na_source__delete(
:source_id
);