db.define_table('Bill',
Field('Bill_NO', 'integer', requires=IS_NOT_EMPTY()),
Field('Date', 'date'),
Field('Customer_ID', requires=IS_NOT_EMPTY()),
Field('Name', requires=IS_NOT_EMPTY()),
Field('Address', 'text', length=255),
Field('Phone', requires=IS_NOT_EMPTY()),
Field('Item', 'list', requires=IS_NOT_EMPTY()), Field('Price', 'list`', requires=IS_NOT_EMPTY()),
Field('Grand_Total', 'double', requires=IS_NOT_EMPTY())
#auth.signature
)
我輸入了上面的代碼,點擊db後出現以下錯誤。比爾模型, (Invaild表/列名「日期」是「全部」保留SQL/NOSQL關鍵字 所以幫我擺脫這種錯誤。謝謝。<type'exceptions.SyntaxError'>(Invaild表/列名「Date」是一個「All」保留的SQL/NOSQL關鍵字
請檢查http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=reserved#Reserved-keywords –