Fix phpunit

This commit is contained in:
Laurent Destailleur 2021-09-09 15:59:43 +02:00
parent e332ca88e4
commit 478918bd45
2 changed files with 5 additions and 5 deletions

View File

@ -12,8 +12,8 @@
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table;
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex;
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- To make pk to be auto increment (postgres):
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
@ -42,8 +42,8 @@ ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_projec
UPDATE llx_extrafields SET elementtype = 'salary' WHERE elementtype = 'payment_salary';
ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;
-- VMYSQL4.1 DROP INDEX idx_payment_salary_extrafields on llx_salary_extrafields
-- VPGSQL8.2 DROP INDEX idx_payment_salary_extrafields
-- VMYSQL4.1 DROP INDEX idx_payment_salary_extrafields on llx_salary_extrafields;
-- VPGSQL8.2 DROP INDEX idx_payment_salary_extrafields;
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);

View File

@ -51,7 +51,7 @@ $fk_user = GETPOST('fk_user', 'int');
$return_arr = array();
if (!empty(GETPOST('fk_user', 'int'))) {
$sql = "SELECT s.amount, s.rowid FROM ".MAIN_DB_PREFIX."salary as s";
$sql .= " WHERE s.fk_user = ".$fk_user;
$sql .= " WHERE s.fk_user = ".((int) $fk_user);
$sql .= " AND s.paye = 1";
$sql .= $db->order("s.dateep", "DESC");