Hi! 

I'm having the same problem: I need to programmatically call an ASK query
and get the result in a plain datastructure (arrays) from within PHP and
find it very difficult to find a solution that isn't deprecated or
completely overkill.

The deprecated solution is using
SMWQueryProcessor::getResultFromFunctionParams (should have been removed as
of SMW 1.8). It's downside is that it's already applying postprocessing, so
I would have to strip the wikitext/html markup out. 

On the other hand, I can always make an internal API call, but this is a
very expensive and inefficient solution for just getting a list of a few
page titles (in my case).

I've found Yurys programming examples, how to create (low level) ASK queries
by hand, but these examples don't work for me anymore (API changes?)
https://semantic-mediawiki.org/wiki/User:Yury_Katkov/programming_examples#Ask-queries

What I'd like to have is some convenient method, like:

SOMETHING->askQueryReturnAsArray($querytext);

Which returns a 2dimensional array (or 1dim, if it's only a list)

Best,
Simon



--
View this message in context: 
http://wikimedia.7.x6.nabble.com/Obtain-data-as-simple-array-tp4994985p5054189.html
Sent from the Semantic Mediawiki - Development mailing list archive at 
Nabble.com.

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

Reply via email to