これらのフェッチの違いは何ですか? 明確なidea.stillを取得するために私に参照サイトの例を与えてください、私はこれらのPythonフェッチタイプについて説明してください
res = cr.dictfetchall()
res2 = cr.dictfetchone()
res3 = cr.fetchall()
res4 = cr.fetchone()
CRは、データベースカーソル(OPENERP 7)
元から、現在の行であることと混同しています:
def _max_reg_no(self, cr, uid, context=None):
cr.execute("""
select register_no as reg_no
from bpl_worker
where id in (select max(id) from bpl_worker)
""")
res = cr.fetchone()[0]
print (res)
return res
あなたのサンプルコードでは 'cr'とは何ですか? –
@olly_uk: 編集後の友だち –
[PEP-249の各メソッドの完全な説明があります](http://www.python.org/dev/peps/pep-0249/#cursor-methods) –