Skip to content
Browse files

Add spaces

  • Loading branch information...
1 parent fac53ed commit bd5b6948a76ae88b477d35e4d16652efd9f0cc05 @c9s committed
Showing with 18 additions and 8 deletions.
  1. +5 −0 ext/php_sqlbuilder.c
  2. +13 −8 src/SQLBuilder/Driver.php
View
5 ext/php_sqlbuilder.c
@@ -34,3 +34,8 @@ PHP_FUNCTION(sqlbuilder_test)
{
RETURN_STRING("Hello World", 1);
}
+
+
+
+
+
View
21 src/SQLBuilder/Driver.php
@@ -177,19 +177,23 @@ public function getPlaceHolder($key)
*/
public function getQuoteColumn($name)
{
-
- if( $c = $this->quoteColumn ) {
+ if ( $c = $this->quoteColumn ) {
// return raw value if column name contains (non-word chars), eg: min( ), max( )
- if( preg_match('/\W/',$name) )
+ if ( preg_match('/\W/',$name) ) {
return $name;
- if( is_string($c) )
+ }
+ if ( is_string($c) ) {
return $c . $name . $c;
- if( 'pgsql' === $this->type )
+ }
+ if ( 'pgsql' === $this->type ) {
return '"' . $name . '"';
- elseif ( 'mysql' === $this->type )
+ }
+ elseif ( 'mysql' === $this->type ) {
return '`' . $name . '`';
- elseif ( 'sqlite' === $this->type )
+ }
+ elseif ( 'sqlite' === $this->type ) {
return '`' . $name . '`';
+ }
}
return $name;
}
@@ -245,8 +249,9 @@ public function quote($string)
*/
public function inflate($value)
{
- if( is_array($value) )
+ if( is_array($value) ) {
return $value[0];
+ }
return $this->inflator->inflate($value);
}

0 comments on commit bd5b694

Please sign in to comment.
Something went wrong with that request. Please try again.