2017년 1월 9일 월요일

College Project Help


Hi guys, i'm pretty new to ai2 and i'm having some trouble getting me head around an aspect of my application. Basically it scans barcodes, grabs the number, you then enter your name and college number and then click the  'check in' or 'check out' buttons. The part im having trouble with is, when someone scans something they have scanned before i need it to grab their details from the database that it's stored in and display it. so, like if they have previously scanned and entered details when they scan again it will display the details they previously scanned with. im just not really sure how to go around doing this to be honest any help welcomed :) thanks.

I will link an image with the blocks in it.


--
I'm assuming, you are using a MySQL database...

so before sending an INSERT statement to the database, what about first sending a SELECT statement to find out, if the item already exists?
if yes, do nothing else send the INSERT statement


-- 
Thank you for this suggestion!! I'll get to work when it's not 2:30 am haha. thanks! :)

-- 

댓글 없음:

댓글 쓰기