cvs: pecl /dbdo/examples schema.php
| From: | Alan Knowles | Date: | Fri, 22 Oct 2004 13:53:47 +0000 |
| Subject: | cvs: pecl /dbdo/examples schema.php | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1973@lists.php.net to get a copy of this message | ||
alan_k Fri Oct 22 09:53:47 2004 EDT
Added files:
/pecl/dbdo/examples schema.php
Log:
add schema info examples
http://cvs.php.net/co.php/pecl/dbdo/examples/schema.php?r=1.1&p=1
Index: pecl/dbdo/examples/schema.php
+++ pecl/dbdo/examples/schema.php
<?php
$x = new DBDO('test','typetest');
$s = $x->schema();
print_r($s);
foreach ($s as $col) {
print_r($x->schema($col));
}
/*
Array
(
[0] => id
[1] => a_date
[2] => a_time
[3] => a_datetime
[4] => b_date
[5] => ts
)
Array
(
[Field name] => id
[Data type] => int
[Size] => 11
[Scale] => 0
[Not null?] => TRUE
[Primary key?] => TRUE
[Unique index?] => FALSE
[References] => auto_increment
[Default value] =>
)
Array
(
[Field name] => a_date
[Data type] => date
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00
)
Array
(
[Field name] => a_time
[Data type] => time
[Size] => -1
[Scale] => 0
[Not null?] => TRUE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 00:00:00
)
Array
(
[Field name] => a_datetime
[Data type] => datetime
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00 00:00:00
)
Array
(
[Field name] => b_date
[Data type] => datetime
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00 00:00:00
)
Array
(
[Field name] => ts
[Data type] => timestamp
[Size] => 14
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] =>
)
alan:/var/svn_live/dbdo# php examples/schema.php
Array
(
[0] => id
[1] => a_date
[2] => a_time
[3] => a_datetime
[4] => b_date
[5] => ts
)
Array
(
[Field name] => id
[Data type] => int
[Size] => 11
[Scale] => 0
[Not null?] => TRUE
[Primary key?] => TRUE
[Unique index?] => FALSE
[References] => auto_increment
[Default value] =>
)
Array
(
[Field name] => a_date
[Data type] => date
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00
)
Array
(
[Field name] => a_time
[Data type] => time
[Size] => -1
[Scale] => 0
[Not null?] => TRUE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 00:00:00
)
Array
(
[Field name] => a_datetime
[Data type] => datetime
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00 00:00:00
)
Array
(
[Field name] => b_date
[Data type] => datetime
[Size] => -1
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] => 0000-00-00 00:00:00
)
Array
(
[Field name] => ts
[Data type] => timestamp
[Size] => 14
[Scale] => 0
[Not null?] => FALSE
[Primary key?] => FALSE
[Unique index?] => FALSE
[References] =>
[Default value] =>
)
*/