diff --git a/mssql.php b/mssql.php index 2c5b054..0cd99e5 100644 --- a/mssql.php +++ b/mssql.php @@ -63,9 +63,9 @@ function connect($config) { if ($this->db = mssql_pconnect($config['server'], $config['username'], $config['password'])) { mssql_select_db($config['database']); - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -126,7 +126,7 @@ function getDatabase() { * @return str[] The primary key field names */ function getPrimaryKeys($table) { - $primary = NULL; + $primary = null; $query = sprintf("SELECT [name] FROM syscolumns WHERE [id] IN (SELECT [id] diff --git a/mysql.php b/mysql.php index 498b8cb..c6dfa10 100644 --- a/mysql.php +++ b/mysql.php @@ -45,10 +45,10 @@ function connect($config) { $config['password'] )) { if ($this->select_db($config['database'])) { - return TRUE; + return true; } } - return FALSE; + return false; } /** @@ -63,9 +63,9 @@ function close() { */ function select_db($database) { if (mysql_select_db($database, $this->db)) { - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -111,7 +111,7 @@ function getDatabase() { */ function getPrimaryKeys($table) { $resource = $this->getColumns($table); - $primary = NULL; + $primary = null; if ($resource) { while ($row = $this->row($resource)) { if ($row['Key'] == 'PRI') { diff --git a/phprestsql.php b/phprestsql.php index 382ba49..4850e40 100644 --- a/phprestsql.php +++ b/phprestsql.php @@ -46,25 +46,25 @@ class PHPRestSQL { * The HTTP request data sent (if any). * @var str */ - var $requestData = NULL; + var $requestData = null; /** * The URL extension stripped off of the request URL * @var str */ - var $extension = NULL; + var $extension = null; /** * The database table to query. * @var str */ - var $table = NULL; + var $table = null; /** * The primary key of the database row to query. * @var str[] */ - var $uid = NULL; + var $uid = null; /** * Array of strings to convert into the HTTP response. @@ -75,7 +75,7 @@ class PHPRestSQL { /** * Type of display, database, table or row. */ - var $display = NULL; + var $display = null; /** * Constructor. Parses the configuration file "phprestsql.ini", grabs any request data sent, records the HTTP @@ -83,7 +83,7 @@ class PHPRestSQL { * @param str iniFile Configuration file to use */ function PHPRestSQL($iniFile = 'phprestsql.ini') { - $this->config = parse_ini_file($iniFile, TRUE); + $this->config = parse_ini_file($iniFile, true); if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD'])) { @@ -101,7 +101,7 @@ function PHPRestSQL($iniFile = 'phprestsql.ini') { $lastPart = array_pop($urlParts); $dotPosition = strpos($lastPart, '.'); - if ($dotPosition !== FALSE) { + if ($dotPosition !== false) { $this->extension = substr($lastPart, $dotPosition + 1); $lastPart = substr($lastPart, 0, $dotPosition); } @@ -519,7 +519,7 @@ function generateResponseData() { /** * Send a HTTP 201 response header. */ - function created($url = FALSE) { + function created($url = false) { header('HTTP/1.0 201 Created'); if ($url) { header('Location: '.$url); diff --git a/postgresql.php b/postgresql.php index 0f4574d..9a38e54 100644 --- a/postgresql.php +++ b/postgresql.php @@ -62,9 +62,9 @@ function connect($config) { ); if ($this->db = pg_pconnect($connString)) { - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -126,7 +126,7 @@ function getDatabase() { */ function getPrimaryKeys($table) { $i = 0; - $primary = NULL; + $primary = null; do { $query = sprintf('SELECT pg_attribute.attname FROM pg_class, pg_attribute, pg_index