hi,
Im designing a python program that will use a barcode scanner to input barcodes and see if they are in a sql database that i have created.
For the moment, i want a user to manually input a barcode:
barcode = input("Please enter barcode and press Enter button:
")
then i want to write a query:cursor.execute("select * where #userinput# = 'barcode'"):
where the #userinput# is the barcode that the user has inputted and the 'barocde' is the corresponding barcode in the database. My problem is that i dont know how to tell the program to use the barcode entered by the user in the sql query.
so i need to find the barcode that the user has inputted in a database with a list of barcodes and their corresponding products, using a query(or another method that will do the same thing), and then i want to print the the barcode along with its product.
can someone please help
thanks a million.
cheatlincoln