View Single Post
  #2  
Old 01-31-2017, 10:10 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,378
IntoRain is on a distinguished road
Default

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
__________________


asp.net stole my soul.
Reply With Quote