SQLSelect
A sql select part of a query.
This may or may not make the cut. With some effort, this may be handy.
Tags
Table of Contents
$properties | Properties to select | IBigSet |
---|---|---|
$table | Table Name | string |
$prefix | Column prefix | string |
$alias | Table alias | string |
__construct() | Create a new SQLSelect instance | mixed |
getPrefix() | mixed | |
getTable() | mixed | |
getSelect() | Retrieve the select part of a sql query | string |
getColumns() | mixed | |
__toString() | Retrieve the select part of a sql query | string |
isSafe() | Detect if a string is only [a-zA-Z0-9_] | bool |
Properties
$properties
Properties to select
private
IBigSet
$properties
$table
Table Name
private
string
$table
$prefix
Column prefix
private
string
$prefix
= ''
$alias
Table alias
private
string
$alias
= ''
Methods
__construct()
Create a new SQLSelect instance
public
__construct(
$properties :
IPropertySet
, $table :
string
[, $alias :
string
= '' ]
[, $prefix :
string
= '' ]
)
: mixed
Parameters
- $properties : IPropertySet
Properties
- $table : string
Table name
- $alias : string = ''
- $prefix : string = ''
Return values
mixedgetPrefix()
public
getPrefix(
)
: mixed
Return values
mixedgetTable()
public
getTable(
)
: mixed
Return values
mixedgetSelect()
Retrieve the select part of a sql query
public
getSelect(
)
: string
Return values
string —statement
getColumns()
public
getColumns(
)
: mixed
Return values
mixed__toString()
Retrieve the select part of a sql query
public
__toString(
)
: string
Return values
string —statement
isSafe()
Detect if a string is only [a-zA-Z0-9_]
private
isSafe(
$s :
string
)
: bool
Parameters
- $s : string
String to check
Return values
bool —is letters