Commit d1ae2324 authored by Taylor Otwell's avatar Taylor Otwell

Fix returning check for Postgres.

parent c878a18f
...@@ -197,7 +197,7 @@ class Connection { ...@@ -197,7 +197,7 @@ class Connection {
// For insert statements that use the "returning" clause, which is allowed // For insert statements that use the "returning" clause, which is allowed
// by database systems such as Postgres, we need to actually return the // by database systems such as Postgres, we need to actually return the
// real query result so the consumer can get the ID. // real query result so the consumer can get the ID.
elseif (stripos($sql, 'insert') === 0 and stripos($sql, 'returning') !== false) elseif (stripos($sql, 'insert') === 0 and stripos($sql, ') returning') !== false)
{ {
return $this->fetch($statement, Config::get('database.fetch')); return $this->fetch($statement, Config::get('database.fetch'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment