v5:reference:connection:properties
Table of Contents
Public Properties Of The Connection
The Connection Object exposes numerous properties that can be used inside SQL statements to create portable statements. For example, to create a portable SQL statement that will return a column in uppercase no matter which database is in use, use the $db→upperCase
property.
String Handling
Property | Description |
---|---|
$substr | Returns the substring operator. Also available as a method substr() |
$length | Returns a length operator |
$random | Returns the random number function |
$upperCase | The uppercase function |
$maxblobsize | The maximum size of data that can be inserted into a blob field. Some drivers return -1 as the value, effectively limitless size |
Date & Time
Property | Description |
---|---|
$sysDate | Returns the current local date in Y-m-d format |
$sysTimeStamp | Returns the current local date/time in Y-m-d H:i:s format |
$sysUTimeStamp | Returns the current timestamp accurate to the microsecond or nearest fraction |
Database Specific Properties
Some drivers expose database-specific properties. See the driver documentation for more information.
v5/reference/connection/properties.txt · Last modified: 2021/03/13 01:11 by mnewnham