i'm currently working with MemSQL Columnstore and trying to integrate it with laravel 5, but everytime i tried to make a query I got the following error
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll().
I've been searching and found this:
Don't use prepared statements in Laravel Eloquent ORM?
And tried to do it like so but is not working. Here's my query
public function index(){
$sql = 'SELECT * FROM SCORE LIMIT 20';
$pdo = DB::getPdo();
$query = $pdo->query($sql);
$result = $query->fetchAll();
return view('home', compact('result'));
}
Any guidance would be highly appreciated.
I had this same issue as well.
According to the MemSQL documentation, you need to configure the client driver: https://docs.memsql.com/concepts/v6.0/prepared-statements/
In database.php, add in a new options key.
Here's my configuration, it's pretty much the same as the default, notice the options key.