using php code to get info on MySQL database...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

using php code to get info on MySQL database...

Post by grabber_grabbs »

Building a database to update my website content.
I have an hardware store, 5000 and more items, 10 differents department.
Would you guys create one BIG sql file to store all the item into, or would you build one sql for each department...
like a sql table file for :
Plumbing
Electrical
smalltool
lumber

etc etc...

My website have an Html/php file for each department, so it is easy to open the right file depending on the html page you are browsing.

I want to do it right the first time... will it be faster to seek and browse and make a search if each departement has their own data file ? i want to developp it to make the server to respond the fastest way.
this is my first experience with php and html. I have good knowledge in programming but now webprogramming... learning fast though.

thanks
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: using php code to get info on MySQL database...

Post by Celauran »

I would create a single products table and a separate departments table with products.department being a foreign key.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: using php code to get info on MySQL database...

Post by pickle »

+1 What ~Celauran said
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply