exposing the dark side of adoption
Register Log in

Sparql test

public

'localhost', 'db_name' => 'poundpup_drpl2', 'db_user' => 'poundpup_drpl2', 'db_pwd' => 'UMXhRR{gSCsh', 'store_name' => 'rdf_store', ); $store = ARC2::getStore($config); if (!$store->isSetUp()) { print 'setting up store

'; $store->setUp(); }else{ print 'store has been setup before.

' ; } $store->reset(); foreach($store->getErrors() as $e){ print $e.'

'; } $query = 'select n2.nid as nid, n2.type as type, filepath from {node} n inner join {content_type_statefact} cts on n.nid = cts.nid and n.vid = cts.vid inner join {files} f on f.nid = n.nid and f.fid = cts.field_state_flag_fid inner join {node} n2 on n2.title = n.title and n2.nid <> n.nid and n2.type = "category_cat"'; $res = db_query($query); while ($data = db_fetch_object($res)) { print $data->nid . ' ' . $data->type . ' ' . $data->filepath.'

'; $rs = $store->query('PREFIX dc:

INSERT INTO { nid . '> <' . $data->filepath . '> . }'); }?>
by Admin on Sunday, 28 December 2008