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

File: mktable.inc

Source Location: /DB-1.7.5/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,
   c 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( mixed $o)

The error handler for the drop table procedure

Prints out an error message and dies.



[ Top ]



Documentation generated on Tue, 29 Mar 2005 10:10:42 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.