Page 1 of 1

Cataloging books in a book library software using PHP

Posted: Thu Nov 12, 2009 11:57 am
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?

Re: Cataloging books in a book library software using PHP

Posted: Thu Nov 12, 2009 7:18 pm
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

Re: Cataloging books in a book library software using PHP

Posted: Fri Nov 13, 2009 2:28 am
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