| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 541 lines (15 kb) |
| Included or required: | 2 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| db_query($query) X-Ref |
| Runs a basic query in the active database. User-supplied arguments to the query should be passed in as separate parameters so that they can be properly escaped to avoid SQL injection attacks. param: $query param: ... return: |
| db_create_table_sql($name, $table) X-Ref |
| Generate SQL to create a new table from a Drupal schema definition. param: $name param: $table return: |
| _db_create_keys_sql($spec) X-Ref |
| No description |
| _db_create_key_sql($fields) X-Ref |
| No description |
| _db_process_field($field) X-Ref |
| Set database-engine specific properties for a field. param: $field |
| _db_create_field_sql($name, $spec) X-Ref |
| Create an SQL string for a field to be used in table creation or alteration. Before passing a field out of a schema definition into this function it has to be processed by _db_process_field(). param: $name param: $spec |
| db_type_map() X-Ref |
| This maps a generic data type in combination with its data size to the engine-specific data type. |
| db_rename_table(&$ret, $table, $new_name) X-Ref |
| Rename a table. param: $ret param: $table param: $new_name |
| db_drop_table(&$ret, $table) X-Ref |
| Drop a table. param: $ret param: $table |
| db_add_field(&$ret, $table, $field, $spec, $keys_new = array() X-Ref |
| Add a new field to a table. param: $ret param: $table param: $field param: $spec param: $keys_new |
| db_drop_field(&$ret, $table, $field) X-Ref |
| Drop a field. param: $ret param: $table param: $field |
| db_field_set_default(&$ret, $table, $field, $default) X-Ref |
| Set the default value for a field. param: $ret param: $table param: $field param: $default |
| db_field_set_no_default(&$ret, $table, $field) X-Ref |
| Set a field to have no default value. param: $ret param: $table param: $field |
| db_add_primary_key(&$ret, $table, $fields) X-Ref |
| Add a primary key. param: $ret param: $table param: $fields |
| db_drop_primary_key(&$ret, $table) X-Ref |
| Drop the primary key. param: $ret param: $table |
| db_add_unique_key(&$ret, $table, $name, $fields) X-Ref |
| Add a unique key. param: $ret param: $table param: $name param: $fields |
| db_drop_unique_key(&$ret, $table, $name) X-Ref |
| Drop a unique key. param: $ret param: $table param: $name |
| db_add_index(&$ret, $table, $name, $fields) X-Ref |
| Add an index. param: $ret param: $table param: $name param: $fields |
| db_drop_index(&$ret, $table, $name) X-Ref |
| Drop an index. param: $ret param: $table param: $name |
| db_change_field(&$ret, $table, $field, $field_new, $spec, $keys_new = array() X-Ref |
| Change a field definition. IMPORTANT NOTE: To maintain database portability, you have to explicitly recreate all indices and primary keys that are using the changed field. That means that you have to drop all affected keys and indexes with db_drop_{primary_key,unique_key,index}() before calling db_change_field(). To recreate the keys and indices, pass the key definitions as the optional $keys_new argument directly to db_change_field(). For example, suppose you have: param: $ret param: $table param: $field param: $field_new param: $spec param: $keys_new |
| db_last_insert_id($table, $field) X-Ref |
| Returns the last insert id. param: $table param: $field |
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |