Hello,
I try to develop a module but when I'm doing a SQL request, many elements seems to be added by I18N module.
For example, I try to execute this code
$sql='select reseller_price from uc_reseller_prices nid=%d' ;
$result=db_query(db_rewrite_sql($sql), $nid);
while ($data=db_fetch_object($result)){
$prix_revendeur=$data->reseller_price;
}
But when it is executed I have the error message
user warning: 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 '=112 WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL)' at line 1 query: select reseller_price from uc_reseller_prices nid=112 WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) in C:\wamp\www\lavoila3\sites\all\modules\perso\maj_attributs\maj_attributs.module on line 24.
The part WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL is added and my request return an error.
It is clear because my request have not a reference to the table node (alias n).
How can I prevent this code to be added?
Thanks in advance.
Sorry for my broken english