Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arr_fields[]: a bigint
- arr_fields[]: b bit
- $fields = array(
- 'a' => array(
- 'type' => 'bigint',
- ),
- 'b' => array(
- 'type' => 'bit',
- )
- );
- $schema = array(
- 'description' => t ('Contains a particular templates data inputted from the MyID Inputting System'),
- 'fields' => $fields,
- );
- db_create_table('myid_template_' . $template_id, $schema);
- foreach ($arr_fields as $value) {
- $arr = explode(' ' , $value);
- $fields[$arr[0]] = array('type' => $arr[1]);
- }
- $schema = array(
- 'description' => t ('Contains a particular templates data inputted from the MyID Inputting System'),
- 'fields' => $fields,
- );
- db_create_table('myid_template_' . $template_id, $schema);
- <em class="placeholder">PDOException</em>: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input
- LINE 4: )
- ^: CREATE TABLE {myid_template_489} (
- a ,
- b
- ); Array
- (
- )
- in <em class="placeholder">db_create_table()</em> (line <em class="placeholder">2720</em> of <em class="placeholder">C:xampphtdocsdrupal-7.34includesdatabasedatabase.inc</em>).
- foreach ($arr_fields as $value) {
- $arr = explode(' ' , $value);
- $fields[$arr[0]] = array('type' => $arr[1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement