please help me on creating library system

Reply

Join Date: Aug 2008
Posts: 11
Reputation: ajie6673 is an unknown quantity at this point 
Solved Threads: 0
ajie6673 ajie6673 is offline Offline
Newbie Poster

please help me on creating library system

 
0
  #1
Aug 25th, 2008
hello to all,

would somebosy help me creating a library system that consist of book inventory, barrower form, validation of user hope someone could be able to help.

iam new in php/mysql and have no idea how to start please help me i will truely appreciate all your help.

thanks
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 11
Reputation: bennymartinson is an unknown quantity at this point 
Solved Threads: 0
bennymartinson bennymartinson is offline Offline
Newbie Poster

Re: please help me on creating library system

 
0
  #2
Aug 25th, 2008
You could do this rather simply using a MySQL database by creating a books table, with columns like title, author, checkedout, checkedoutdate, etc.

I would recommend you look for a book on PHP/MySQL to become more familiar with the basics. Or, visit www.php.net/docs.php or www.mysql.com for more in-depth documentation.

If you have any more specific questions, I'd be glad to answer them.

Hope this helps
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 11
Reputation: ajie6673 is an unknown quantity at this point 
Solved Threads: 0
ajie6673 ajie6673 is offline Offline
Newbie Poster

Re: please help me on creating library system

 
0
  #3
Aug 25th, 2008
thanks for the info, ive already created some table on mysql but having some trouble on how to call what i've had done with mysql using php. hope you could be able to help me.

thanks for the reply
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 11
Reputation: bennymartinson is an unknown quantity at this point 
Solved Threads: 0
bennymartinson bennymartinson is offline Offline
Newbie Poster

Re: please help me on creating library system

 
0
  #4
Aug 25th, 2008
Alright, say you have a table named booktable with columns named bookid, title, author, and checkedout. Then to get that information out of the database, you need to query your database with mysql_query();. To return a table row that has a book id of 5, you use the SELECT command in PHP. So your code could look something like this...

  1. <?php
  2.  
  3. //lets start by connecting to mysql you only have to do this once in your page.
  4. $con = mysql_connect('yourhost','yourusername','yourpassword');
  5. if (!$con) {
  6. die ('Could not connect: ' . mysql_error());
  7. }
  8.  
  9. //select your database
  10. mysql_select_db('yourdatabase', $con);
  11.  
  12.  
  13. //now query the database
  14. $query = "SELECT bookid, title, author, checkedout FROM booktable WHERE bookid=5";
  15. $result = mysql_query($query, $con);
  16.  
  17. //But now the result is in the form of an object. To get information out, we can use mysql_fetch_assoc().
  18.  
  19. $row = mysql_fetch_assoc($result)
  20.  
  21. $bookid=$row['bookid']; // now $bookid has the bookid for this book.
  22. $title=$row['title']; //same here, etc.
  23. $author=$row['author'];
  24.  
  25. ?>

This is very basic, there's a lot more you can do with MySQL that can make your application much more powerful. Hope this helps.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 11
Reputation: ajie6673 is an unknown quantity at this point 
Solved Threads: 0
ajie6673 ajie6673 is offline Offline
Newbie Poster

Re: please help me on creating library system

 
0
  #5
Aug 27th, 2008
thanks for the info, i'll try create something base on your script. ill try to figure how does it works. hope to hear from you again.

ill keep you inform on would be the status on the system that i've been doing

again thanks for your help.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 11
Reputation: ajie6673 is an unknown quantity at this point 
Solved Threads: 0
ajie6673 ajie6673 is offline Offline
Newbie Poster

Re: please help me on creating library system

 
0
  #6
Sep 7th, 2008
thanks for the reply, would you help out how to create a simple form. consist of book reference no., title, author, category, and quantity.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1070 | Replies: 5
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC