This topic is locked

Barcodes?

4/18/2009 5:44:09 AM
PHPRunner General questions
N
nitro23456 author

Hi
I would like to be able to use a barcode reader to scan barcodes of items and split the barcode string into different fields..........
So, if I had a barcode on a tin of soup of 12345678abc01012008 with the '12345678' meaning what the item is (e.g. a tin of soup), the 'abc' meaning the batch number and the '01012008' being an expiry date.
I would like to scan this existing barcode thats on the tin of soup once using a barcode reader and for my stock page to split it into:
Barcode: 123456789abc01012008
Item: 12345678

Batch Number: abc

Expiry:01012008
Before clicking save/submit at the bottom of the page. How do I do this?
Secondly........
I would also like to then add another number to the barcode. Say for example, I received ten tins of soup (from the same batch) to book into stock, the page could look like this:
Barcode: 123456789abc01012008
Item: 12345678

Batch Number: abc

Expiry:01012008

Number Received: [user selects number from drop down menu]
When I click submit I would like ten entries to be made (or whatever number were received) and the number added to the barcode field........ 123456789abc010120081 123456789abc010120082........... 123456789abc0101200810 etc
Can the entries also produce a barcode image so I can print out labels with barcodes on as well?!
Thanks

hfg 4/27/2009

I see you figured out the printing of barcodes, did you figure out an answer on the splitting of text string?
If not, look into using the Left, Right and MID SQL functions (assuming your lengths are consistent)
MYSQL reference:
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html