Overview

Packages

  • objSQL

Documentation

  • objSQL Connection
  • objSQL Error Handling
  • General Queries
  • Prepared Statements
  • Transactions
  • Resultset Methods
  • Helper Method - Select Query
  • Helper Method - Update Query
  • Helper Method - Insert Query
  • Helper Method - Delete Query
  • Helper Method - Paging Query
  • Utility Methods

Classes

  • mysql_connection
  • mysql_prepare
  • mysql_resultset
  • mysql_statement
  • mysql_transaction
  • objSQL
  • pgsql_connection
  • pgsql_prepare
  • pgsql_resultset
  • pgsql_statement
  • pgsql_transaction
  • sqlite3_connection
  • sqlite3_prepare
  • sqlite3_resultset
  • sqlite3_statement
  • sqlite3_transaction
  • sqlsrv_connection
  • sqlsrv_prepare
  • sqlsrv_resultset
  • sqlsrv_statement
  • sqlsrv_transaction
  • Overview
  • Package
  • Class
  • Tree

objSQL General Queries

The obj_query() method executes general queries and is called from the objSQL class.

  • The $query argument is required.

Returns: Result resource/object or false on failure.

<?php

//usage: $dbh->obj_query( $query )

try
{
    
$rs = $dbh->obj_query( "select prod_id from mytable where color='blue' and product='balloon'" );
        
    if ( 
$dbh->obj_error() )
        throw new 
Exception( $dbh->obj_error_message() );
        
    echo 
$rs->obj_num_rows(); 
}
catch ( 
Exception $e ) 
{
    
//log error and/or redirect user to error page
} 

?>

objSQL 3.1.0 API documentation generated by ApiGen 2.8.0

Documentation licensed under a Creative Commons Attribution 3.0 Unported License.