Actually, I thought about a way that could work, except I still have to 
find an example in PHP.

In case someone already knows the answer, how would I go about getting the 
results of a #show or #ask query in PHP ?

Something like :

$propertyValuesArray = GetQueryResults("{{#show:Some page|?Some 
property}}")

Is this possible with the SMW API ?

- Laurent

----------------------------------------
From: "Laurent Alquier" <laur...@alquier.org>
Sent: Saturday, July 25, 2009 6:43 AM
To: "Semantic MediaWiki Developers List" 
<semediawiki-devel@lists.sourceforge.net>
Subject: [SMW-devel] How about retrieving a single triple ? 

Related to a recent question about retrieving all triples on a page - is 
there a quick way to retrieve a single triple on a page ?

More precisely - If I have a page name and a property name, is there a 
direct way to get the values for that pair (page, property name) without 
having to declare the supporting structures such as : 


 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

 


    $page =
SMWDataValueFactory::newTypeIDValue( '_wpg', 
$title->getFullText());

    $semdata =
smwfGetStore()->getSemanticData($page->getTitle()     );  



- Laurent


------------------------------------------------------------------------------
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to