Home    Back    Forward    Refresh    txtSQL Homepage

Where Clauses

A where clause tells txtSQL what rows that you are looking for. Where clauses can be used in select(), delete() and update. A where clause is simply an array in the following format.

     array(['$column $op $value' [, $logicalOp]]...);

where $column is the name of the column, $op is the operator to use, and $value is the value to check against. For more information on operators, see the relational operators section. For more information on logical operators, see the logical operators section.



User Comments - Where Clauses
Faraz Ali <SaiyanM at hotmail dot com>
July 30, 2004, 11:18 pm
When creating a 'where clause', there is a special column that is set-up for you to use; 'primary'.

When txtSQL sees that you are using 'primary' as the column name, it automatically checks to see if there is a primary key assigned to this table, and if there is, it uses that column instead.

For Example:
<?php
$sql->select(array('where' => array('primary => 56')...));
?>
Last Page Next Page

'Language Reference'
  • Logical Operators
  • Relational Operators
  • Data Types
  • Column Types
  • Primary Keys
  • Functions
  • Where Clauses
  • LIKE Clauses
  • Limit Clauses
  • OrderBy Clauses
  • Notes
  • txtSQL 3.0.0 Beta Readme

    User Functions

    Database Functions

    Data Manipulation Functions

    Table Functions

    Error Handling Functions

    SQL Syntax

  • [ txtSQL Documentation powered by txtSQL | 6 SQL Queries ]