World-Three-Technologies / Masxaro-Prototype

Other
8 stars 4 forks source link

database receipt_item.item_id and receipt.receipt_time #2

Closed Rafe closed 13 years ago

Rafe commented 13 years ago

can you change receipt_item.item_id to auto increase? also the receipt_time, I have to insert "receipt_time= 'now()'" or it will raise sql error, can this to be set as default?

bshimkaveg commented 13 years ago

Was this to me or Yaxing?

Sent from my iPhone

On Jun 10, 2011, at 1:16 PM, Rafereply@reply.github.com wrote:

can you change receipt_item.item_id to auto increase? It's nasty to insert figure out what id to be insert, also the receipt_time, I have to insert "receipt_time= 'now()'" or it will raise sql error, Why can't this to be set as default?

Reply to this email directly or view it on GitHub: https://github.com/gpryzby-wtt/Masxaro-Prototype/issues/2

Rafe commented 13 years ago

sorry, it's to Yaxing

yaxing commented 13 years ago

I suppose item_id is from the merchant, for example, cheese burger's id in McDonalds is 50. Therefore it's not auto-incremented in our database. I changed receipt_time from DATETIME to TIMESTAMP(14), I believe you can insert a receipt without specifying the time now.

yaxing commented 13 years ago

Jimmy, I updated APIs, sample.html and fix some bugs. would you please also review some of my code and comment on bad code? Thank you.

Rafe commented 13 years ago

Thanks