Ivory ORM Docs

Ivory ORM Docs

  • Docs

›SQL Syntax

SQL Syntax

  • First-Steps
  • Select
  • Select Distinct
  • Where
  • And, Or and Not
  • Order By
  • Insert
  • Update
  • Delete
  • Min and Max
  • Count, Avg and Sum
  • Like
  • In
  • Between
  • Alias
  • Joins
  • Union
  • Group By
  • Having
  • Exists
  • Any & All
  • Procedures

Alias

Alias

The use of alias in your query can be easily done in ivory.

Example

//import the ivory class
require_once('Operations.php');

//the instance of the ivory
$ivoryOrm = new Operations();

$arrSelect[] = "SUM(productValue) AS total";

$tables[] = "products";

//the method select creates the query : SELECT SUM(productValue) AS total FROM products;
$select = $ivoryOrm->select($arrSelect, $tables);

//the method runQuery is responsible to literally run your query into the database;
$result = $ivoryOrm->runQuery($select);

← BetweenJoins →
  • Alias
  • Example
Repository Link
Copyright © 2020 Kevin da Silva