PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Nov 17, 2018 12:47 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jun 26, 2018 10:50 pm 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
I was wondering how to use MySQL to handle an inventory system, easy enough when there is a simple count of the UPC for each item

I was wondering with electronics how to handle series numbers

clearly serial numbers are not useful as an index, while UPC is slightly more suitable

ideas?

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 12:50 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13583
Location: New York, NY, US
I would in general recommend an autoincrement INT for indexes. The product, serial, series, etc. numbers would be separate fields that can be indexed if they are to be searched in WHERE statements.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 3:17 pm 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
That is more or less what I was figuring, more rows for those items with serial numbers.

products like iphone cables do not have a serial number, unlike the iphone itself

upc codes are abundant but imperfect

I was pondering 2 tables, one for the products and a bool then for those who have serial numbers,pull the data from another table which would simplify things a tad

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Thu Jun 28, 2018 11:17 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13583
Location: New York, NY, US
Vegan wrote:
I was pondering 2 tables, one for the products and a bool then for those who have serial numbers,pull the data from another table which would simplify things a tad
Sounds like more work if there is just 1:1 relation -- just leave the serial number field empty if there isn't one. It's not like your disk will fill up with all those serial numbers.

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group