The entire "where" part of the query has to be inside the quotation marks. Also, you can fetch everything at once rather than making multiple calls to the database
PHP Code:
$riddle = $mysidia->db->select("riddle", array("id", "clue", "solve"), "name = '{$mysidia->input->post('currname')}'")->fetchObject();
$id = $riddle->id;
$clue = $riddle->clue;
$solve = $riddle->solve;