DB
[ class tree: DB ] [ index: DB ] [ all elements ]

File: mktable.inc

Source Location: /DB-1.7.12/tests/driver/mktable.inc

Classes:

Page Details:

Creates the phptest table

Tries to drop the table first, in case it already exists.

 CREATE TABLE phptest (
   a INTEGER NULL,
   b CHAR(40) DEFAULT 'def' NOT NULL,
   cc VARCHAR(255) NULL,
   d VARCHAR(20) NULL)

Need NOT NULL on b to test DB_PORTABILITY_RTRIM. MS SQL and Sybase trim output from VARCHAR, but not on CHAR.

Need DEFAULT value on b because Oracle considers an empty string to be NULL.

In Oracle, when using placeholders in WHERE clauses on CHAR columns, the column must have RTRIM() run on the column: SELECT * FROM phptest WHERE RTRIM(b) = ?

PHP versions 4 and 5

LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.

Includes:

require_once('./connect.inc') [line 50]
Establishes the DB object and connects to the database
require_once('./droptable.inc') [line 55]
Get the drop_table() function

debug_die [line 62]

void debug_die( $o)

The error handler for the drop table procedure

Prints out an error message and dies.



Parameters

   $o  
[ Top ]



Documentation generated on Fri, 29 Jun 2007 09:30:25 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.