March 21st, 2012, 07:44 AM
Barcode, php, mysql
I am very new to Barcode systems, however I have good enough knowledge to create html, php and mysql (light applications) applications.
Using barcode I'd like to achive simplifying our stock take process.
What I was thinking to print a unique id for each product on a barcode:
define following on the mysql database:
a product name
a product size
number of items in the batch
When the barcode reads the id, by using a simple PHP script with simple HMTL form, I would like to add or delete a product from the database.
How is this possible?
Is there any examples that I can go through?
March 21st, 2012, 07:00 PM
Most barcode readers can be set to input just like a keyboard. I have mine to also add a carriage return after the input.
So if it reads a barcode for 1234 it will enter 1234 plus a carriage return where ever the prompt is.
Comments on this post
March 22nd, 2012, 04:42 AM
Many thanks for your reply. So the example above is for one data field. What about adding multiple fields as:
Originally Posted by ttremain
1) Product ID: 1234
2) Quantity: 4
How can I define this in the barcode, also how can I create the barcode and how can I create the data fields accordingly?
Also do you recommend any "dumb" not smart barcodes (cheap) or any with keyboard functionality will work?
March 22nd, 2012, 05:19 AM
I guess you could create a barcode for "4-1234", or a separate barcode for "qty-4" then you scan it, and follow it up with a scan for the product "1234".
To print barcodes, I use a p-touch label printer. The software allows me to import from many sources, like a CSV. I've not gotten around to linking to my mysql database, via an ODBC connection yet. Maybe this year.
I think this is off topic for PHP, but the scanner I'm using is an older model:
If I was looking for a simple scanner again, I'd get one with a cradle type charger.
I do plan on upgrading this year to a smart scanner, one that will run some form of Windows, then I can make some hotkeys out of different buttons. An example that might fit your app, would be: press a button for "Inventory" then enter the quantity with the buttons on the scanner itself, and then scan the product.
Your software would have to match your application. If it's browser enabled, you could write it in PHP. I have not done it yet. (because I don't have a smart scanner) So far I've just used the browser on the attached PC. Run over, click a few things, to setup what screen I want, then run around and scan whatever it is I need.
Each item either goes in as a form submission by itself, or each as a single line in a <textarea>, then I submit when I have all the items I want.
In short, you don't typically use the scanner to enter "5 candy bars". Think of the grocery store, either they scan each item one at a time, or they scan one of them the number of times to match the quantity, or they enter 5 on their keyboard, and scan it once.
If you are trying to add items with different "options" you will need a different item number for each possibility.
Item 34: small shirt white
Item 35: small shirt red
Item 36: medium shirt white
Item 37: medium shirt Red
Now, a barcode can also contain letters as well as numbers.
Your itemid could be alphanumeric:
Letters take up more space on most barcode types. A 4 digit number is going to be narrower than a 4 digit number with letters.
That is probably about as much info as I can give you, since it's not real relevant to this forum.
Send me a PM if you need anything more.
March 22nd, 2012, 05:32 AM
now I understand how barcoding works,
Many thanks, I will PM if I need any help