kr3m3r Posted July 9, 2007 Share Posted July 9, 2007 First let me thank you for taking the time to read this post. I'm not sure if this in the right place, or even a reasonable question, but here it goes. I'm hoping to create a Library interface/program for a class I am taking. Since it is a library (and therefore a database) I was planning on using php and mySQL. What I really want to do is create an interface that allows the users to check in and check out items (I'm pretty sure that is no problem. Here is the part I'm not sure about:), and also allow the user to enter new types of items to be stored. Essentially the initial state of the Library is empty, then the users would create an item, give it a name, and the number of attributes, then the name of each attribute. Once the item is created and the attributes named the user could begin to add items into the library of that type. i.e. The user would create an item Book, which would have 3 attributes, Author's name, Title, and UPC. Then the user would be able to add books to the library to check in or check out. Later the user could create an item DVD, which would have 4 attributes, Title, UPC, Main star, and Director. in the end the user would be able to use this program to create Libraries of any items, and track and search the library for further items. I hope you guys can help me by letting me know if this is even possible, and whether I've bitten off way more than I can chew. Thanks again for your time. -Robb Quote Link to comment Share on other sites More sharing options...
perl2php Posted July 9, 2007 Share Posted July 9, 2007 You sure have bitten off alot there if you are new to php and mysql. The project you have described sounds easy.. just time consuming. Someone here would have to build it for you in order to provide you with any real help. This book would be of some value... http://www.amazon.com/Beginning-Apache-MySQL-Development-Programmer/dp/0764579665/ref=sr_1_1/103-5303218-2955030?ie=UTF8&s=books&qid=1183949854&sr=1-1 Hope that helps. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 9, 2007 Share Posted July 9, 2007 this is alot of work but it is possible. to tell you the truth nobody here is going to do it for you especially if its a class you are doing it for. if you learn some php you can prob start. but nobody here will do it all for you... sorry we just help fix problems mostly Quote Link to comment Share on other sites More sharing options...
kr3m3r Posted July 9, 2007 Author Share Posted July 9, 2007 I appreciate that no one will do it here. I wouldn't want them to frankly, I won't learn much if I get others to do my work for me. Mostly I was wondering if A) it was even possible. and B) if people had any suggestions on where to start. I'm sure as I go along, I'll ask more, but for now thats all I hoped to know. -Robb Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 9, 2007 Share Posted July 9, 2007 start by building a db with the info that you want to store such as id, type, title, UPC, etc.... then by building a input page that inputs the info into the db Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 9, 2007 Share Posted July 9, 2007 It's a huge learning project starting from scratch. If you're in a hurry (or just want a sweet database adminstration section), take a look at phpMyEdit from www.platon.sk. You could probably build everything you needed with that and phpMyAdmin to create the tables in a few hours. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 9, 2007 Share Posted July 9, 2007 It can be done via 2 tables 1 table contains all the types of periodicals (dvd, book, mag, vhs etc) it has a primarykey of ID a sub primary key of periodical id and atribute name and then atribute requried (if that atribute is required or not BOOL variable) so basically it looks like ID P_ID Atr Req 1 1 name 1 2 1 title 1 3 1 author 0 4 2 name 1 5 2 title 1 6 2 numdisk 0 then to recall it you just say select * from peridoicals WHERE P_ID = $itemtype for the second table its similar ID P_ID ITEM_ID Atr the key is that you have lots of rows each attribute is its own row. You would probably want either a third table or a hand coded switch that defines each P_ID and also another table for items status (checked out, not checked out, hold, missing etc etc use a int field and then a switch to deteremine its status just need 2 fields there ITEM_ID and Status since ITEM_ID will always be unique on this table Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 9, 2007 Share Posted July 9, 2007 Its not really a complicated system you just have to be very careful in coding because you have arrays of varying lengths so you will really want to use a lot of foreach loops and switch logics for the varying item types (for instant item previewing would be different for each item type) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.