Searched refs:db (Results 1 - 25 of 76) sorted by relevance

1234

/PHP_5_3/ext/pdo/tests/
H A Dpdo_test.inc36 $db = new $classname($dsn, $user, $pass, $attr);
38 if (!$db) {
51 $db->exec("DROP TABLE $table");
55 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
56 $db->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
57 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
58 return $db;
63 $db = PDOTest::factory();
/PHP_5_3/ext/pdo_dblib/
H A Ddb.php3 /* assumes that you have the freetds db.lib on windows */
10 $db = new PDO('sybase:', 'pdo', 'pdo'); variable
11 $db->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_EXCEPTION);
12 debug_zval_dump($db);
14 $stmt = $db->prepare('select 10');
29 $db = null; variable
/PHP_5_3/ext/pdo_mysql/tests/
H A Dmysql_pdo_test.inc24 $db = new $classname($dsn, $user, $pass, $attr);
25 if (!$db) {
29 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
30 $db->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
32 return $db;
35 static function createTestTable($db, $engine = null) {
39 $db->exec('DROP TABLE IF EXISTS test');
40 $db->exec('CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine);
41 $db->exec("INSERT INTO test(id, label) VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')");
82 static function getClientVersion($db) {
[all...]
H A Dtable.inc2 if (!$db) {
4 $db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
6 // $db->exec('DROP TABLE IF EXISTS test');
7 $db->exec('CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine);
8 $db->exec('INSERT INTO test(id, label) VALUES (1, "a"), (2, "b"), (3, "c"), (4, "d"), (5, "e"), (6, "f")');
/PHP_5_3/ext/pgsql/
H A Dmysql_users.php19 function pg_list_dbs($db)
21 assert(is_resource($db));
31 return pg_query($db, $query);
38 function pg_list_tables($db)
40 assert(is_resource($db));
53 return pg_query($db, $query);
61 function pg_list_fields($db, $table)
63 assert(is_resource($db));
79 return pg_query($db, $query);
/PHP_5_3/ext/phar/tests/files/
H A Dpear2coverage.phar.php493 function __construct($testpath, $codepath, $db = ':memory:')
504 $this->sqlite = new Sqlite($codepath, $db);
752 function __construct($testpath, $codepath, $db = ':memory:')
763 $this->sqlite = new Sqlite($db, $codepath, $testpath);
928 protected $db;
938 $this->db = new \Sqlite3($path);
941 if (@$this->db->querySingle($sql) == '2.1.0') {
942 $this->codepath = $this->db->querySingle('SELECT codepath FROM paths');
943 $this->testpath = $this->db->querySingle('SELECT testpath FROM paths');
954 $this->db
925 protected $db; variable
935 $this->db = new \\Sqlite3($path); variable
[all...]
/PHP_5_3/ext/spl/examples/
H A Ddba_dump.php32 $db = new DbaReader($argv[1], $argv[2]); variable
35 $db = new KeyFilter($db, $argv[3]); variable
38 foreach($db as $key => $val) {
H A Ddbaarray.inc30 $this->db = dba_popen($file, "c", $handler);
31 if (!$this->db) {
52 $data = dba_fetch($name, $this->db);
74 //dba_replace($name, serialize($value), $this->db);
75 dba_replace($name, $value, $this->db);
84 return dba_exists($name, $this->db);
94 return dba_delete($name, $this->db);
H A Ddbareader.inc20 protected $db = NULL;
31 if (!$this->db = dba_open($file, 'r', $handler)) {
40 dba_close($this->db);
47 $this->key = dba_firstkey($this->db);
57 $this->key = dba_nextkey($this->db);
66 $this->val = dba_fetch($this->key, $this->db);
81 if ($this->db && $this->key !== false) {
/PHP_5_3/ext/sqlite/libsqlite/src/
H A Dattach.c30 sqlite *db; local
36 db = pParse->db;
37 if( db->file_format<4 ){
43 if( db->nDb>=MAX_ATTACHED+2 ){
65 for(i=0; i<db->nDb; i++){
66 if( db->aDb[i].zName && sqliteStrICmp(db->aDb[i].zName, zName)==0 ){
74 if( db->aDb==db
138 sqlite *db; local
192 sqlite *db; local
[all...]
H A Dauth.c74 sqlite *db,
78 db->xAuth = xAuth;
79 db->pAuthArg = pArg;
108 sqlite *db = pParse->db; local
116 if( db->xAuth==0 ) return;
142 assert( pExpr->iDb<db->nDb );
143 zDBase = db->aDb[pExpr->iDb].zName;
144 rc = db->xAuth(db
73 sqlite_set_authorizer( sqlite *db, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pArg ) argument
174 sqlite *db = pParse->db; local
[all...]
H A Dbuild.c38 sqlite *db = pParse->db; local
41 if((db->flags & SQLITE_Initialized)==0 && db->init.busy==0 ){
42 int rc = sqliteInit(db, &pParse->zErrMsg);
48 for(i=0; i<db->nDb; i++){
49 DbClearProperty(db, i, DB_Locked);
50 if( !db->aDb[i].inTrans ){
51 DbClearProperty(db, i, DB_Cookie);
68 sqlite *db local
105 sqliteFindTable(sqlite *db, const char *zName, const char *zDatabase) argument
157 sqliteFindIndex(sqlite *db, const char *zName, const char *zDb) argument
177 sqliteDeleteIndex(sqlite *db, Index *p) argument
195 sqliteUnlinkAndDeleteIndex(sqlite *db, Index *pIndex) argument
218 sqliteResetInternalSchema(sqlite *db, int iDb) argument
289 sqliteRollbackInternalChanges(sqlite *db) argument
298 sqliteCommitInternalChanges(sqlite *db) argument
318 sqliteDeleteTable(sqlite *db, Table *pTable) argument
361 sqliteUnlinkAndDeleteTable(sqlite *db, Table *p) argument
433 sqlite *db = pParse->db; local
776 sqliteChangeCookie(sqlite *db, Vdbe *v) argument
885 sqlite *db = pParse->db; local
1142 sqliteViewResetAll(sqlite *db, int idx) argument
1179 sqlite *db = pParse->db; local
1488 sqlite *db = pParse->db; local
1760 sqlite *db = pParse->db; local
2020 sqlite *db; local
2040 sqlite *db; local
2062 sqlite *db; local
2087 sqlite *db = pParse->db; local
2117 sqlite *db = pParse->db; local
2146 sqlite *db = pParse->db; local
[all...]
H A Dcopy.c42 sqlite *db = pParse->db; local
51 assert( pTab->iDb<db->nDb );
52 zDb = db->aDb[pTab->iDb].zName;
63 if( db->flags & SQLITE_CountRows ){
92 if( (db->flags & SQLITE_CountRows)!=0 ){
99 if( db->flags & SQLITE_CountRows ){
H A Ddelete.c69 sqlite *db; /* Main database structure */ local
83 db = pParse->db;
102 assert( pTab->iDb<db->nDb );
103 zDb = db->aDb[pTab->iDb].zName;
159 if( db->flags & SQLITE_CountRows ){
168 if( db->flags & SQLITE_CountRows ){
203 if( db->flags & SQLITE_CountRows ){
265 sqliteGenerateRowDelete(db, v, pTab, iCur, pParse->trigStack==0);
303 if( db
336 sqliteGenerateRowDelete( sqlite *db, Vdbe *v, Table *pTab, int iCur, int count ) argument
367 sqliteGenerateRowIndexDelete( sqlite *db, Vdbe *v, Table *pTab, int iCur, char *aIdxUsed ) argument
[all...]
H A Dmain.c28 sqlite *db; /* The database being initialized */ member in struct:__anon387
70 sqlite *db = pData->db; local
77 ** But because db->init.busy is set to 1, no VDBE code is generated
82 assert( db->init.busy );
83 db->init.iDb = atoi(argv[4]);
84 assert( db->init.iDb>=0 && db->init.iDb<db->nDb );
85 db
187 sqliteInitOne(sqlite *db, int iDb, char **pzErrMsg) argument
379 sqliteInit(sqlite *db, char **pzErrMsg) argument
476 sqlite *db; local
544 sqlite_last_insert_rowid(sqlite *db) argument
551 sqlite_changes(sqlite *db) argument
561 sqlite_last_statement_changes(sqlite *db) argument
568 sqlite_close(sqlite *db) argument
601 sqliteRollbackAll(sqlite *db) argument
623 sqlite_exec( sqlite *db, const char *zSql, sqlite_callback xCallback, void *pArg, char **pzErrMsg ) argument
691 sqlite_compile( sqlite *db, const char *zSql, const char **pzTail, sqlite_vm **ppVm, char **pzErrMsg ) argument
906 sqlite_busy_handler( sqlite *db, int (*xBusy)(void*,const char*,int), void *pArg ) argument
921 sqlite_progress_handler( sqlite *db, int nOps, int (*xProgress)(void*), void *pArg ) argument
944 sqlite_busy_timeout(sqlite *db, int ms) argument
955 sqlite_interrupt(sqlite *db) argument
993 sqlite_create_function( sqlite *db, const char *zName, int nArg, void (*xFunc)(sqlite_func*,int,const char**), void *pUserData ) argument
1014 sqlite_create_aggregate( sqlite *db, const char *zName, int nArg, void (*xStep)(sqlite_func*,int,const char**), void (*xFinalize)(sqlite_func*), void *pUserData ) argument
1042 sqlite_function_type(sqlite *db, const char *zName, int dataType) argument
1059 sqlite_trace(sqlite *db, void (*xTrace)(void*,const char*), void *pArg) argument
1072 sqlite_commit_hook( sqlite *db, int (*xCallback)(void*), void *pArg ) argument
1109 sqliteBtreeFactory( const sqlite *db, const char *zFilename, int omitJournal, int nCache, Btree **ppBtree) argument
[all...]
H A Dpragma.c70 ** Interpret the given string as a temp db location. Return 1 for file
93 sqlite *db = pParse->db; local
94 if( db->temp_store==ts ) return SQLITE_OK;
95 if( db->aDb[1].pBt!=0 ){
96 if( db->flags & SQLITE_InTrans ){
101 sqliteBtreeClose(db->aDb[1].pBt);
102 db->aDb[1].pBt = 0;
103 sqliteResetInternalSchema(db, 0);
105 db
129 sqlite *db = pParse->db; local
162 sqlite *db = pParse->db; local
[all...]
H A Dtrigger.c55 sqlite *db = pParse->db; local
68 if( db->init.busy
69 && sqliteFixInit(&sFix, pParse, db->init.iDb, "trigger", pName)
79 if( iDb>=2 && !db->init.busy ){
81 "database %s", db->aDb[tab->iDb].zName);
87 if( sqliteHashFind(&(db->aDb[iDb].trigHash), zName,pName->n+1) ){
109 const char *zDb = db->aDb[tab->iDb].zName;
110 const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
165 sqlite *db local
394 sqlite *db = pParse->db; local
425 sqlite *db = pParse->db; local
[all...]
/PHP_5_3/scripts/dev/
H A Dcheck_parameters.php138 function check_param($db, $idx, $exp, $optional)
142 if ($idx >= count($db)) {
148 } elseif ($db[$idx][0] === '**dummy**') {
152 if ($db[$idx][1] != $exp) {
153 error("{$db[$idx][0]}: expected '$exp' but got '{$db[$idx][1]}' [".($idx+1).']');
156 if ($optional && !$db[$idx][2]) {
157 error("optional var not initialized: {$db[$idx][0]} [".($idx+1).']', 1);
159 } elseif (!$optional && $db[$idx][2]) {
160 error("not optional var is initialized: {$db[
[all...]
/PHP_5_3/ext/mysql/tests/
H A Dclean_table.inc5 if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
7 $host, $myhost, $user, $db, $port, $socket);
H A Dtable.inc5 if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
7 $host, $myhost, $user, $db, $port, $socket);
/PHP_5_3/ext/mysqli/tests/
H A Dclean_table.inc4 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
6 $host, $user, $db, $port, $socket);
H A Dskipifconnectfailure.inc5 $link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
H A Dtable.inc4 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
6 $host, $user, $db, $port, $socket);
/PHP_5_3/ext/sqlite/
H A Dsess_sqlite.c30 #define PS_SQLITE_DATA sqlite *db = (sqlite*)PS_GET_MOD_DATA()
43 sqlite *db; local
46 db = sqlite_open(save_path, 0666, &errmsg);
47 if (db == NULL) {
55 sqlite_busy_timeout(db, 60000);
57 sqlite_exec(db, "PRAGMA default_synchronous = OFF", NULL, NULL, NULL);
58 sqlite_exec(db, "PRAGMA count_changes = OFF", NULL, NULL, NULL);
62 sqlite_exec(db,
69 PS_SET_MOD_DATA(db);
78 sqlite_close(db);
[all...]
H A Dsqlite.c105 #define DB_FROM_ZVAL(db, zv) ZEND_FETCH_RESOURCE2(db, struct php_sqlite_db *, zv, -1, "sqlite database", le_sqlite_db, le_sqlite_pdb)
107 #define DB_FROM_OBJECT(db, object) \
110 db = obj->u.db; \
111 if (!db) { \
138 struct php_sqlite_db *db; member in struct:php_sqlite_result
151 sqlite *db; member in struct:php_sqlite_db
160 struct php_sqlite_db *db; member in struct:php_sqlite_agg_functions
191 ZEND_ARG_INFO(0, db)
678 struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr; local
744 struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr; local
1129 struct php_sqlite_db *db; member in union:_sqlite_object::__anon206
1473 struct php_sqlite_db *db = NULL; local
1551 struct php_sqlite_db *db = NULL; local
1734 struct php_sqlite_db *db; local
1759 struct php_sqlite_db *db; local
1866 sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result **prres, zval *errmsg TSRMLS_DC) argument
1942 struct php_sqlite_db *db; local
1994 struct php_sqlite_db *db; local
2069 struct php_sqlite_db *db; local
2121 struct php_sqlite_db *db; local
2488 struct php_sqlite_db *db; local
2604 struct php_sqlite_db *db; local
2788 struct php_sqlite_db *db; local
2812 struct php_sqlite_db *db; local
3189 struct php_sqlite_db *db; local
3233 prep_callback_struct(struct php_sqlite_db *db, int is_agg, char *funcname, zval *step, zval *fini, struct php_sqlite_agg_functions **funcs) argument
3300 struct php_sqlite_db *db; local
3350 struct php_sqlite_db *db; local
[all...]

Completed in 81 milliseconds

1234