Cataloging books in a book library software using PHP

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
rbhoumik
Forum Newbie
Posts: 13
Joined: Wed Nov 11, 2009 7:06 am

Cataloging books in a book library software using PHP

Post by rbhoumik »

I have developed a book library management software using PHP and MySql...The problem is that I don't know how to catalog the books in proper manner and generate a catalog number...can someone help me with this problem?
jackbutler1
Forum Newbie
Posts: 3
Joined: Thu Nov 12, 2009 4:21 pm

Re: Cataloging books in a book library software using PHP

Post by jackbutler1 »

Can you explain a bit more how you want the books catalogued properly?
As for the catalogue number, add a column to your mysql database using this command:

alter table table_name add column cataloguenumber int(10) auto_increment not null primary key;

replace table_name with the name of your table name. This will allow you to have up to 9999999999 books. Every time a book is added to the database, it is automatically assigned a unique number in a column called cataloguenumber.

Hope that helps

Jack
rbhoumik
Forum Newbie
Posts: 13
Joined: Wed Nov 11, 2009 7:06 am

Re: Cataloging books in a book library software using PHP

Post by rbhoumik »

jackbutler1 wrote:Can you explain a bit more how you want the books catalogued properly?
As for the catalogue number, add a column to your mysql database using this command:

alter table table_name add column cataloguenumber int(10) auto_increment not null primary key;

replace table_name with the name of your table name. This will allow you to have up to 9999999999 books. Every time a book is added to the database, it is automatically assigned a unique number in a column called cataloguenumber.

Hope that helps

Jack
Is it possible to show the catalog number in this fashion?..."category/book name/year of upload"

Means Let's assume that the book name is X, category is science,yr of upload is 1987...so the catalog number generated will be Science/X/1987

...Please help
Post Reply