Topic: Unexpected Query Results
Hey All,
I'm working on an extension that adds dice rolling and validation functionality for the numerous play-by-post games run on my forum. My original code was embedded in PunBB 1.2.x, and so I've been in the process of porting it to the newer (and OMG, much nicer...) extension format.
Anyway, I'm getting erroneous results from my query, and I'm not sure why. The query:
$query = array(
'SELECT' => 'rolls',
'FROM' => 'dice_rolls',
'WHERE' => 'id='.$pid.' AND topic_id='.$id.' AND top=1'
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
The result I'm getting is, "Resource id #<some number>" instead of the expected values from the `rolls` field.