Could someone give me an idea on how to create a "Reservatio n" for my Online Library Website..
tnx in advance ^^
Hi,
You shoukld start by deciding what data you want to store, and then what you need to be able to do with this data. When you have the data and associated methods sorted out you can think about the page layout.
It sounds like you may need to read some tutorials on PHP, MySQL at least and then maybe look at AJAX as it may be useful.
I recommedn you Google PHP Tuotrial and MySQL tutorial- the offerings from the W3C got me started.
Then when you have had a go simply post back with specific quetions. People are more helpful if you can show to have helped yourself first.
Hi,
You shoukld start by deciding what data you want to store, and then what you need to be able to do with this data. When you have the data and associated methods sorted out you can think about the page layout.
It sounds like you may need to read some tutorials on PHP, MySQL at least and then maybe look at AJAX as it may be useful.
I recommedn you Google PHP Tuotrial and MySQL tutorial- the offerings from the W3C got me started.
Then when you have had a go simply post back with specific quetions. People are more helpful if you can show to have helped yourself first.
Cheers
nathj
Tnx for replying, I'll be using PHP and MySQL for my database but i can't seem to understand how the reservation of Books done..
Tnx for replying, I'll be using PHP and MySQL for my database but i can't seem to understand how the reservation of Books done..
Hi,
Well assuming you have user accounts for this and the books are displayed on the screen you could make the title of the book clickable. When clicking this title the user is taken to a page where they are informed that the book has been reserved for a certain period of time ready for their collection - or if you are posting it that they can expect the book in a set number of days.
Then, on this page use and UPDATE command in MySQL to update some fields against the book to indicate when the book was reserved, by whom, how long it will be reserved for and when it would be due back.
When you display the list of available books you can use this information to determine if a title should be clickable. If a boko is already reserved then it cannot be clicked but you display a piece of information next to it saying when it is available from.
Alternatively you could que reservations in a separate table.
There's a basic overview of how I would tackle this problem. Hopefully it's a enough to get you started on this task.
Well assuming you have user accounts for this and the books are displayed on the screen you could make the title of the book clickable. When clicking this title the user is taken to a page where they are informed that the book has been reserved for a certain period of time ready for their collection - or if you are posting it that they can expect the book in a set number of days.
It shouldn't be user accounts. Probably, the term must be borrower accounts instead of user accounts.
Hi werks
There are many things you have to consider. For an instance the borrower, does it means that only the borrower can reserve the book? how about the guests? of course not. hehe... How do you plan to reserve the book? by borrower, or by manually reserved the book?
Originally posted by nathj
Then, on this page use and UPDATE command in MySQL to update some fields against the book to indicate when the book was reserved, by whom, how long it will be reserved for and when it would be due back.
In addition to his post, don't also forget to include sanction (maybe on a related table) for not returning the book on time. : )
Have a nice day!
Rey Sean
Last edited by lotus18; Jan 4 '08, 11:02 AM.
Reason: .
It shouldn't be user accounts. Probably, the term must be borrower accounts instead of user accounts.
Merely different words for the same thing. They are borrowers of books and users of the online reservation system. The words used are alomst irrelevant the point is that some way of handling those who use this system to reserv/borrow books must be implemented.
Originally posted by lotus18
In addition to his post, don't also forget the include sanction (maybe on a related table) for not returning the book on time. : )
The idea of sacntions is very useful, and an idea had not ocnsidered. However, I would avoid using explicit relations in the MySQL database.
I'm interested to know how you are getting onwith this project as I have often thought of setting something like this up form extended family so that we can borrow each others books without having to physically traverse the country.
I have little knowledge in web programming, i have tried asp, php, and mysql as their backend. So how will you do it?
Hi,
I would simply define each table with a primary key and then were necessary incolude this PK on other tables as an implicit FK. This way I can control what happens on uopdate and delete etc without worrying about what the data engine may do automatically for me. When using many-to-many relationships in a fully normalised data structure this level of control is essential.
I think that answers the question you were asking.
I would simply define each table with a primary key and then were necessary incolude this PK on other tables as an implicit FK. This way I can control what happens on uopdate and delete etc without worrying about what the data engine may do automatically for me. When using many-to-many relationships in a fully normalised data structure this level of control is essential.
I think that answers the question you were asking.
Cheers
nathj
OK. I got it. The database structure must be in normalized form. Maybe I didn't got your point earlier. : )
Well assuming you have user accounts for this and the books are displayed on the screen you could make the title of the book clickable. When clicking this title the user is taken to a page where they are informed that the book has been reserved for a certain period of time ready for their collection - or if you are posting it that they can expect the book in a set number of days.
Then, on this page use and UPDATE command in MySQL to update some fields against the book to indicate when the book was reserved, by whom, how long it will be reserved for and when it would be due back.
When you display the list of available books you can use this information to determine if a title should be clickable. If a boko is already reserved then it cannot be clicked but you display a piece of information next to it saying when it is available from.
Alternatively you could que reservations in a separate table.
There's a basic overview of how I would tackle this problem. Hopefully it's a enough to get you started on this task.
Comment