在Laravel 4中使用存储过程

问题描述:

我试图通过laravel路由调用存储过程,但我不断收到错误消息:

I'm trying to call a stored procedure from via a laravel route and i keep getting an error:

{"error":{"type":"Illuminate\\Database\\QueryException","message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'emailAddress' in 'field list' (SQL: CALL getLibraryList(emailAddress))",

我相信我打的电话是正确的:

I believe the call I'm making is correct:

$result = DB::statement('CALL getLibraryList('.$email.')');
return $result;

找到了一种使此工作有效的方法

Found out a way to get this working here:

$result = DB::select('call getLibraryList(?)',array($email));