|
From: Olivier C. <ocu...@sw...> - 2005-04-07 10:06:19
|
Hi,
I can not query a model twice in the same script.
For example:
$myDBStore = new DbStore ('MySQL', '127.0.0.1', 'essai', 'root', '');
$myModel = $myDBStore->getModel('astronomy');
$query1 = 'SELECT * WHERE (?x,<rdfs:subclassof>,?y)';
$result1 = $myModel->rdqlQuery($query1);
// Do something with $result1...
$query2 = 'SELECT * WHERE (?x,<rdf:type>,?y)';
$result2 = $myModel->rdqlQuery($query2);
// Do something with $result2...
I've got a correct answer with $result1.
$result2 returns the correct number of rows but each row is empty:
[0] => Array
(
[?x] => literal Object
(
[label] =>
[lang] =>
[dtype] =>
)
[?y] => literal Object
(
[label] =>
[lang] =>
[dtype] =>
)
)
[1] => Array
(
[?x] => literal Object
(
[label] =>
[lang] =>
[dtype] =>
)
[?y] => literal Object
(
[label] =>
[lang] =>
[dtype] =>
)
)
...
The problem will occurs even if I try to execute query2 fist then query1: I
will have an empty set of rows for $result1.
Do you have any idea?
Thank you for your help,
Olivier
|