1
, 나는이 SQL 요청을 실행하기 cr.execute을 사용하고 cr.execute (SQL)를OpenERP/Odoo - 문자열 내부의 견적이 작동하지 않습니다 - OpenERP 7에서
cr.execute('select distinct(value) from ir_translation where name = \'product.bat3,name\' and src = \''+ str(res_bat[j][0].encode('utf-8'))+'\' and res_id = '+ str(res_bat[j][1])+' and lang = \''+ str(line2.partner_id.lang)+'\'')
그러나 res_bat 내 문자열 [ j] [0]은 따옴표가있는 문자열입니다. 문자열은 다음과 같습니다 시험의 따라서 나는 울부 짖는 오류가 있습니다
ProgrammingError: syntax error at or near "s"
LINE 1: ... where name = 'product.bat3,name' and src = 'test's' and res...
어떻게이 오류를 해결하기 위해 내 SQL 요청을 수정할 수 있습니다?
Perfect! 고맙습니다! – Selverine