Topic: Mysql storing quotes as '

Hello. I apologize if this is not the correct place to ask this, but why are my SQL queries being saved inside X_SQL_TRAIL tables with the single quotes represented as ' For example:

INSERT INTO 2_sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date,
        order_type, ship_via, deliver_to, delivery_address, contact_phone,
        freight_cost, from_stk_loc, delivery_date, payment_terms, total)
        VALUES ('50','0','2', '30','3', '','auto','','2013-11-19', '1', '1','Ventas Al Contado','Km. 15.5 Carretera a Masaya.', '55555555', '0', 'DEF', '2013-11-19','5','2300')

This is very annoying. Is there anyway to fix this? Thank you. I am using version 2.3.18.

Bosco

2 (edited by ostertagi 11/19/2013 04:58:11 pm)

Re: Mysql storing quotes as '

i dont see what's wrong.
&# 039;  stands for an apostrophe, it's normal for sql query to use apostrophe.
executed in php your query will provide something like :
INSERT INTO 2_sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date, order_type, ship_via, deliver_to, delivery_address, contact_phone, freight_cost, from_stk_loc, delivery_date, payment_terms, total) VALUES ('50','0','2', '30','3', '','auto','','2013-11-19', '1', '1','Ventas Al Contado','Km. 15.5 Carretera a Masaya.', '55555555', '0', 'DEF', '2013-11-19','5','2300').
as long as there is no error in the execution  of your erp, that should be fine.
you'r talking about x_sql_trail, it's used to store all executed queries, for audit or tracking purposes. if you see it as an issue, you can always modify  the function db_query($sql, $err_msg = null) (connect_db.php) to force using an apostrophe instead of   &# 039;

abdelghani