found my error. i was querying the wrong database so it did exist but my app was using a different database where the stored procedure didn't exist.
i also switched out DB::statement for DB::select. with DB::statement i get a true/false result instead of a resultset.
Hey,
I'm using Eloquent ORM along with SLIM.
This is my AppModel
use Illuminate\Database\Eloquent\Model as Eloquent;
/**
* Description of GetPostProcedure
*
* @author hemant
*/
class GetPostProcedure extends Eloquent {
public function getPost($user_id, $post_id) {
$SQL = 'get_view_user_post(' . $post_id . ',' . $user_id . ',5.5)';
// return $this->select('call ' . $SQL, [$post_id, $user_id]); // call type 1
return DB::select('call ' . $SQL); // call type 2
}
}
in Call type 1, i get back an object with no data at all. and in type 2, i get error
what can be done here??
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community