refactoring.

This commit is contained in:
Taylor Otwell
2011-09-06 22:26:14 -05:00
parent 7eef380d8a
commit 70b6cc5994
11 changed files with 56 additions and 45 deletions

View File

@@ -87,7 +87,7 @@ class Connection {
{
$result = (array) $this->first($sql, $bindings);
return (strpos(strtolower($sql), 'select count') === 0) ? (int) reset($result) : (float) reset($result);
return (strpos(strtolower(trim($sql)), 'select count') === 0) ? (int) reset($result) : (float) reset($result);
}
/**

View File

@@ -7,11 +7,6 @@ class Postgres extends Query {
/**
* Insert an array of values into the database table and return the value of the ID column.
*
* <code>
* // Insert into the "users" table and get the auto-incrementing ID
* $id = DB::table('users')->insert_get_id(array('email' => 'example@gmail.com'));
* </code>
*
* @param array $values
* @return int
*/