Fix sql syntax error
This commit is contained in:
parent
49a2f4f0c6
commit
03eb870576
@ -189,7 +189,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker
|
|||||||
// Add line buf to buffer if not a comment
|
// Add line buf to buffer if not a comment
|
||||||
if (! preg_match('/^--/',$buf))
|
if (! preg_match('/^--/',$buf))
|
||||||
{
|
{
|
||||||
$buf=preg_replace('/([,;])\s*--.*$/','\1',$buf); //remove comment from a line that not start with -- before add it to the buffer
|
$buf=preg_replace('/([,;ERLT\)])\s*--.*$/i','\1',$buf); //remove comment from a line that not start with -- before add it to the buffer
|
||||||
$buffer .= trim($buf);
|
$buffer .= trim($buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,12 +45,12 @@ CREATE TABLE llx_accounting_bookkeeping
|
|||||||
fk_user_modif integer, -- | user making last change
|
fk_user_modif integer, -- | user making last change
|
||||||
date_creation datetime, -- FEC:EcritureDate | creation date
|
date_creation datetime, -- FEC:EcritureDate | creation date
|
||||||
tms timestamp, -- | date last modification
|
tms timestamp, -- | date last modification
|
||||||
fk_user integer NULL -- The id of user that validate the accounting source document
|
fk_user integer NULL, -- The id of user that validate the accounting source document
|
||||||
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
|
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
|
||||||
journal_label varchar(255), -- FEC:JournalLib
|
journal_label varchar(255), -- FEC:JournalLib
|
||||||
piece_num integer NOT NULL, -- FEC:EcritureNum | accounting source document
|
piece_num integer NOT NULL, -- FEC:EcritureNum | accounting source document
|
||||||
validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification)
|
validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification)
|
||||||
date_validated datetime -- FEC:ValidDate
|
date_validated datetime, -- FEC:ValidDate
|
||||||
import_key varchar(14),
|
import_key varchar(14),
|
||||||
extraparams varchar(255) -- for other parameters with json format
|
extraparams varchar(255) -- for other parameters with json format
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
@ -23,7 +23,6 @@ create table llx_extrafields
|
|||||||
name varchar(64) NOT NULL, -- name of field into extrafields tables
|
name varchar(64) NOT NULL, -- name of field into extrafields tables
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
elementtype varchar(64) NOT NULL DEFAULT 'member', -- for which element this extra fields is for
|
elementtype varchar(64) NOT NULL DEFAULT 'member', -- for which element this extra fields is for
|
||||||
tms timestamp, -- date of last update
|
|
||||||
label varchar(255) NOT NULL, -- label to show for attribute
|
label varchar(255) NOT NULL, -- label to show for attribute
|
||||||
type varchar(8),
|
type varchar(8),
|
||||||
size varchar(8) DEFAULT NULL,
|
size varchar(8) DEFAULT NULL,
|
||||||
@ -41,5 +40,5 @@ create table llx_extrafields
|
|||||||
fk_user_author integer, -- user making creation
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_modif integer, -- user making last change
|
fk_user_modif integer, -- user making last change
|
||||||
datec datetime, -- date de creation
|
datec datetime, -- date de creation
|
||||||
tms timestamp
|
tms timestamp -- date of last update
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user