Closed firegate666 closed 12 years ago
remove hardcoded sql
public static function getLastStep($user_id, $adventure_id) { $log = AdventureLog::model()->findBySql(' SELECT * FROM "AdventureLog" WHERE "userId" = :userId AND "adventureId" = :adventureId AND "finalized" = 0 ORDER BY "createdAt" DESC LIMIT 1 ', array( ':userId' => $user_id, ':adventureId' => $adventure_id, )); if ($log === null) { return null; } return $log->adventureStepId; }
fixed with e4c898e31cf5121b73e1a47da14c2f7cd933af28
remove hardcoded sql