Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • DateTime
  • Directory
  • File
  • Image
  • Mailer
  • SQL
  • YAML

Class SQL

SQL Class Helper definition.

Namespace: Core\Helpers
Used by: CMS\Helpers\DataTables::toQuery()
Used by: CMS\Helpers\DataTables::assignFilter()
Located at helpers/sql.php

Methods summary

public static string
# customQuery( string $table, mixed $attributes = '*', string $where = '1', string $order = null, integer $offset = null, integer $limit = null )

Custom query wrapper.

Custom query wrapper.

Parameters

$table
Table name.
$attributes
Column names to query.
$where
Condition.
$order
Order clause.
$offset
Result set offset.
$limit
Result set limit.

Returns

string
public static string
# union( array $queries, string $order = null, integer $offset = null, integer $limit = null )

Builds a UNION SQL query with shared ORDER BY and LIMIT.

Builds a UNION SQL query with shared ORDER BY and LIMIT.

Parameters

$queries
Array of queries to union.
$order
Order clouse.
$offset
Offset count.
$limit
Limit count.

Returns

string
public static string|array
# filter( array $attributes, boolean $use_prepared_statements = true )

Builds a WHERE part of the query suitable for filters.

Builds a WHERE part of the query suitable for filters.

Parameters

$attributes
Filtering attributes.
$use_prepared_statements
Whether to use prepared statements or not.

Returns

string|array
public static string
# filterByType( array $attributes )

Builds a WHERE part of the query suitable for filters with defined data types of the attribute.

Builds a WHERE part of the query suitable for filters with defined data types of the attribute.

Parameters

$attributes
Filtering attributes.

Returns

string
public static string
# setOffsetLimit( integer $offset, integer $limit )

Builds a set - offset part of a query.

Builds a set - offset part of a query.

Parameters

$offset
Offset count.
$limit
Limit count.

Returns

string
private static boolean
# removeFilterAttributes( string $attr )

Removes filtered attributes.

Removes filtered attributes.

Parameters

$attr
Attribute value.

Returns

boolean
Silla.IO API API documentation generated by ApiGen