Thread:Project:Support desk/Mediawiki equivalent to mysql/mysqli fetch array?

I've spent hours, and hours, and hours dealing with this!

I've been writing an extension - It's really not too complicated. Yet, as life does sometimes, there's that useless, horrifically stupid road block that prevents you from doing the simplest of things.

An example of my code:

$dbr = wfGetDB( DB_SLAVE ); $rese = $dbr->select( 'post_categories', array( 'category' ), array( "post_id" => $post_id ));

What I'm trying to do:

Get EVERY value from the "category" column in "post_categories" WHERE post_id => $post_id (A variable defined elsewhere), and put them each in their own variables (Or in the very least, an array)

HOWEVER! There's seemingly NO WAY to do so - I can either select only one category at a time (Which consumes more processing than necessary, and the categories vary so I'd have to write a function for each category), or, which is completely useless in this case as I can't use it anywhere else in the code.

Tell me - Is there ANY way I collect every value from category column, and use those values elsewhere? I can get this function to work outside of Mediawiki - But elsewhere, no such luck.

I've put way too much time and effort into this extension to have it all go down with this - What should I do?