Fix sql error

This commit is contained in:
Laurent Destailleur 2016-08-31 18:46:47 +02:00
parent 56d6510472
commit f04a3bf0c8
3 changed files with 11 additions and 2 deletions

View File

@ -48,6 +48,10 @@ foreach ($tmpstatus2label as $key => $val) $status2label[$key]=$langs->trans($va
$object = new Establishment($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
/*
* Actions
*/
@ -128,7 +132,8 @@ else if ($action == 'update')
$error ++;
}
if (empty($error)) {
if (empty($error))
{
$object->name = GETPOST('name', 'alpha');
$object->address = GETPOST('address', 'alpha');
$object->zip = GETPOST('zipcode', 'alpha');

View File

@ -537,3 +537,7 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1);
-- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL;
-- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL;

View File

@ -33,7 +33,7 @@ CREATE TABLE llx_establishment (
profid3 varchar(20),
phone varchar(20),
fk_user_author integer NOT NULL,
fk_user_mod integer NOT NULL,
fk_user_mod integer,
datec datetime NOT NULL,
tms timestamp NOT NULL,
status tinyint DEFAULT 1