NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Simple book database

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 12-26-2008, 03:25 PM THREAD STARTER               #1 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Simple book database


I made a database to keep track of all my books earlier this week (features/screenshots here), and thought I'd give it away in case anyone wants something similar.
I haven't tested it on anything other than Apache 2.2.11, PHP 5.2.7, MySQL 5.0.68, and Opera 9.63 - so if you use anything else, use it at your own risk. I didn't pay any attention to security when making it, so it's not really appropriate for anything else than running on your own computer.

Download

The SQL to set up the database is located in database.php, where you also need to enter the database details. Note: cover images must have the same name as the book (sans any '?', '!', ''', ':', '\', or '/') and be located in a folder relative to book.php called ./covers/ and be .jpg files (I included a blank folder for you).
Barrucadu is offline   Reply With Quote
Old 12-26-2008, 03:35 PM   #2 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
Neat!

Perhaps add ISBN Lookup support? Would be useful and fairly easy.
Daniel is offline   Reply With Quote
Old 12-26-2008, 03:49 PM THREAD STARTER               #3 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Done! The zip file has been updated. Now click the [+] next to the ISBN number to be taken to the isbndb.com page (if it exists).
Barrucadu is offline   Reply With Quote
Old 12-28-2008, 05:14 AM THREAD STARTER               #4 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




I've updated the script:
  • ISBN numbers are now separated by hyphens, not spaces. When entering them you can use either hyphens or spaces.
  • The blurb now has a "<p>" before and a "</p>" after.
  • There is now bbcode-like replacement of certain characters in the blurb:
    • " - " becomes " &mdash; "
    • "\r\n\r\n" becomes "</p><p>"
    • "\r\n" becomes "<br/>"
    • "..." becomes "&hellip;"
    • "[ i]" becomes "<em>"
    • "[ /i]" becomes "</em>"
    • "[ b]" becomes "<strong>"
    • "[ /b]" becomes "</strong>"
    • "[ u]" becomes "<span style="text-decoration:underline;">"
    • "[ /u]" becomes "</span>"

????: NamePros.com http://www.namepros.com/code/545743-simple-book-database.html
Note: There are no spaces in the bbcode tags, I just had to put them there to stop VB parsing them.
Last edited by Barrucadu; 12-28-2008 at 05:20 AM.
Barrucadu is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:17 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger