This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION process_deleted() RETURNS TRIGGER AS $$ | |
BEGIN | |
IF (TG_OP = 'DELETE') THEN | |
EXECUTE 'INSERT INTO deleted_' || TG_RELNAME || ' VALUES(($1).*)' USING OLD; | |
RETURN OLD; | |
END IF; | |
RETURN NULL; | |
END; | |
$$ LANGUAGE plpgsql; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function parseRss($feedUrl) { | |
$result = array(); | |
// "@" is for error handling | |
$feed = @simplexml_load_file($feedUrl); | |
//atom | |
if (isset($feed->entry)) { | |
$result['title'] = (string)$feed->title; | |
$result['link'] = (string)$feed->link->attributes()->href; |
NewerOlder