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.
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 |
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 |
Some drivers expose database-specific properties. See the driver documentation for more information.