Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT * FROM expanse_add_new WHERE id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, meal_type, persons, restaurant, REPLACE(amount,'€','') AS amount, paid_by, date, comment, document FROM expanse_meal WHERE expanse_id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT sum( REPLACE( amount, '€', '' ) ) AS amount FROM `expanse_meal` WHERE expanse_id =

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY exp.id' at line 1]
SELECT exp.id, exp.number_nota_spese, exp.user_id, exp.saptitle, exp.title, exp.month, exp.year, REPLACE(REPLACE(REPLACE(exp.amount,'.',''),',','.'), '€', '') as amount,exp.created_date, exp.registration_statement, exp.attachment, exp.status,exp.close_cost, SUM(REPLACE(REPLACE(REPLACE(exp_ml.amount,'.',''),',','.'), '€', '')) as pasti_amount, exp_ml.paid_by FROM expanse_add_new as exp left join expanse_meal as exp_ml on exp.id = exp_ml.expanse_id WHERE exp.id= GROUP BY exp.id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and exp_ml.paid_by=13 GROUP BY exp.id' at line 2]
SELECT exp.id,SUM(REPLACE(REPLACE(REPLACE(exp_ml.amount,'.',''),',','.'), '€', '')) as cash_total, exp_ml.paid_by FROM expanse_add_new as exp left join expanse_meal as exp_ml on exp.id = exp_ml.expanse_id WHERE exp.id= and exp_ml.paid_by=13 GROUP BY exp.id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and exp_ml.paid_by=14 GROUP BY exp.id' at line 3]
SELECT exp.id,SUM(REPLACE(REPLACE(REPLACE(exp_ml.amount,'.',''),',','.'), '€', '')) as creadit_total, exp_ml.paid_by FROM expanse_add_new as exp left join expanse_meal as exp_ml on exp.id = exp_ml.expanse_id WHERE exp.id= and exp_ml.paid_by=14 GROUP BY exp.id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY expanse_id' at line 1]
SELECT exp_trv.expanse_id, exp_opt.id, exp_trv.km_travel,SUM(REPLACE(exp_trv.km_travel,',','.') * REPLACE(exp_opt.options,',','.')) as Total_km, exp_opt.options from expanse_travaling as exp_trv left join expanse_options_type as exp_opt on exp_opt.id = exp_trv.km_rate WHERE expanse_id= GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=13 GROUP BY expanse_id' at line 2]
SELECT exp_trv.expanse_id, exp_opt.id, exp_trv.km_travel,SUM(REPLACE(exp_trv.km_travel,',','.') * REPLACE(exp_opt.options,',','.')) as Total_km_cash, exp_opt.options from expanse_travaling exp_trv left join expanse_options_type as exp_opt on exp_opt.id = exp_trv.km_rate WHERE expanse_id= and paid_by=13 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=14 GROUP BY expanse_id' at line 3]
SELECT exp_trv.expanse_id, exp_opt.id, exp_trv.km_travel,SUM(REPLACE(exp_trv.km_travel,',','.') * REPLACE(exp_opt.options,',','.')) as Total_km_credit, exp_opt.options from expanse_travaling exp_trv left join expanse_options_type as exp_opt on exp_opt.id = exp_trv.km_rate WHERE expanse_id= and paid_by=14 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY expanse_id' at line 1]
SELECT expanse_id,SUM(REPLACE( REPLACE( REPLACE(amount_paid, '.', '' ) , ',', '.' ) , '€', '' )) as Total_exp from expanse_overnight_stay WHERE expanse_id= GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=13 GROUP BY expanse_id' at line 2]
SELECT expanse_id, SUM(REPLACE( REPLACE( REPLACE(amount_paid, '.', '' ) , ',', '.' ) , '€', '' )) as nightSty_cash from expanse_overnight_stay WHERE expanse_id= and paid_by=13 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=14 GROUP BY expanse_id' at line 3]
SELECT expanse_id,SUM(REPLACE( REPLACE( REPLACE(amount_paid, '.', '' ) , ',', '.' ) , '€', '' )) as nightSty_credit from expanse_overnight_stay WHERE expanse_id= and paid_by=14 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY expanse_id' at line 1]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_tripexp from expanse_trip WHERE expanse_id= GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=13 GROUP BY expanse_id' at line 2]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_tripexp_cash from expanse_trip WHERE expanse_id= and paid_by=13 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=14 GROUP BY expanse_id' at line 3]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_tripexp_credit from expanse_trip WHERE expanse_id= and paid_by=14 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY expanse_id' at line 1]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_OfficeExp from expanse_office WHERE expanse_id= GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=13 GROUP BY expanse_id' at line 2]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_OfficeExp_cash from expanse_office WHERE expanse_id= and paid_by=13 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and paid_by=14 GROUP BY expanse_id' at line 3]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_OfficeExp_credit from expanse_office WHERE expanse_id= and paid_by=14 GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY expanse_id' at line 1]
SELECT expanse_id,SUM(REPLACE(REPLACE(REPLACE(amount,'.',''),',','.'), '€', '')) as Total_Deduct from expanse_deduct WHERE expanse_id= GROUP BY expanse_id

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, expanse_type, exp_title, motorway, date, description, km_travel, km_rate, paid_by, vehicle_no, vehicle_model, vehicle_engine, comment, fuel_type FROM expanse_travaling WHERE expanse_id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, stay_type, description, REPLACE(amount_paid,'€','') AS amount_paid, paid_by, date, guests, ref_expanse, document, comment FROM expanse_overnight_stay WHERE expanse_id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, expanse_type, ref_expanse, description, REPLACE(amount,'€','') AS amount, date, paid_by, comment, document FROM expanse_office WHERE expanse_id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, expanse_type, ref_expanse, description, REPLACE(amount,'€','') AS amount, paid_by, date, comment, document FROM expanse_trip WHERE expanse_id=

Errore sul database di WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT id, expanse_id, ref_expanse, date, description, REPLACE(amount,'€','') AS amount FROM expanse_deduct WHERE expanse_id=