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

File: mktable.inc

Source Location: /DB-1.6.4/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) = ?

  • Version: $Id: mktable.inc,v 1.14 2004/04/29 23:20:24 danielc Exp $

Includes:

require_once('./connect.inc') [line 39]
Establishes the DB object and connects to the database.

Documentation generated on Sun, 16 May 2004 05:32:54 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.