Author Topic: PHP / MySQL...who here knows it?  (Read 599 times)

Offline JohnH

  • Jedi Padawan
  • *
  • Posts: 615
    • View Profile
    • DC Collector Universe
PHP / MySQL...who here knows it?
« on: May 11, 2006, 06:11 PM »
Does anyone here know a bit about PHP and MySQL?  I'm working on developing a website and there are a couple of issues I'm having - one with a search page and another involving an aggregate count of categories, subcategories and content of each.  The support for the CMS I'm using isn't getting me anywhere regarding these problems and I was hoping maybe there was a developer or two here that might be willing to help.  I can probably even pay a couple of bucks if it need be (or buy you a pizza or something).  :) 

Thanks for looking.  Please PM or e-mail if you think you might be able to help.

John

Offline JesseVader08

  • Retired Staff Member
  • Jedi Sentinel
  • *
  • Posts: 10797
    • View Profile
Re: PHP / MySQL...who here knows it?
« Reply #1 on: May 11, 2006, 06:39 PM »
I'd say Chris is definitely the man to talk to.

Offline jokabofe

  • Jedi Knight
  • *
  • Posts: 3653
    • View Profile
Re: PHP / MySQL...who here knows it?
« Reply #2 on: May 11, 2006, 07:30 PM »
What exactly are the issues you're having? More details please  :)

Offline JohnH

  • Jedi Padawan
  • *
  • Posts: 615
    • View Profile
    • DC Collector Universe
Re: PHP / MySQL...who here knows it?
« Reply #3 on: May 11, 2006, 09:33 PM »
What exactly are the issues you're having? More details please  :)

I thought I'd leave that to the PMs, but hey...why not?  ;)

The site in progress is at www.toytraderz.com, which I hope to have live by June some time.   One feature of the site is a Toy Database, the main page of which can be found here:

http://www.toytraderz.com/index.php?name=ttgallery

The structure of this CMS's image gallery is like so.  First there are categories, which can have related subcategories.  Then the albums (which hold images and info) are attached to the applicable category or subcategory.  Examples you’ll see on the site now are:

Star Wars
Star Wars > Modern
Star Wars > Modern > Hasbro – Saga (2006-present)
Star Wars > Modern > Hasbro – Saga (2006-present) > Figures

These categories then have albums which hold each item’s details and images.  For instance, the Hasbro – Saga 2006 category > Figures category has a subcategory of albums for each item in that line, shown here:

http://www.toytraderz.com/index.php?name=ttgallery&cat=28

Each album then has a set of images.  So data is pulled from a categories table, an albums table, and a pictures table.

You can see on the main gallery page what one of the problems is.  The main Star Wars category, when you total up everything in the applicable subcategories, has 751 items and 341 images.  But as you can see it doesn’t show this aggregate count in the main gallery menu or sub categories – it only shows “0” unless the next level down is the album itself.  Example can be seen here:

http://www.toytraderz.com/index.php?name=ttgallery&cat=25

Where all these categories have subcategories except Kubrick, so they're all showing 0 except Kubrick's count of 2.

The second issue is the search.  It appears to be using an “or” operator to search rather than an “and”.  Here is the search page:

http://www.toytraderz.com/index.php?name=ttgallery&file=search

Let’s say I type in “Alien”.  I get 43 items.  I type in “game” and I get 6 items.  Now, if I want to put in “Alien Game”, I should only get the 6 items, but instead I’m getting 43 because it’s searching to see if the keywords has game *or* Alien, not game *and* Alien.  I know what the issue is here, I just don't know how to fix it.  :)

I really didn't want to show this until it was ready to launch, but no biggie...anyone bored enough is welcome to get in there and make some posts in the forum to get things going.  :P

Coincidentally, if anyone feels like contributing to the site, let me know.  There's a ton of work to do in the toy database and I know there are some knowledgable collectors out there that would loooove to help.  ;)

John

Offline Famine

  • Noderator
  • Jedi Master
  • *
  • Posts: 5050
  • Who watches The Famine?
    • View Profile
Re: PHP / MySQL...who here knows it?
« Reply #4 on: May 11, 2006, 11:29 PM »
For your database, what lines are you covering? :)

Kevin
The picture kept, will remind me...

Offline JohnH

  • Jedi Padawan
  • *
  • Posts: 615
    • View Profile
    • DC Collector Universe
Re: PHP / MySQL...who here knows it?
« Reply #5 on: May 11, 2006, 11:54 PM »
For your database, what lines are you covering? :)

Kevin

Everything.  :)  We just have a few in there now, but I have a list of maybe 160 more lines that we'll be adding over time.  So basically, if there was a toy made (in the action figure vein anyway) we hope to have some info on it eventually.  A lot of time will probably go into some of the more obscure and lesser-known older lines, but as is obvious by the front page we're going to keep current news out there as well. 

John
« Last Edit: May 11, 2006, 11:56 PM by JohnH »

Offline Famine

  • Noderator
  • Jedi Master
  • *
  • Posts: 5050
  • Who watches The Famine?
    • View Profile
Re: PHP / MySQL...who here knows it?
« Reply #6 on: May 12, 2006, 12:07 AM »
Talk to Dan Clemmons at JPToys.com about a Jurassic Park database link hookup or what have you. :) Tell him that Kevin E. Curdgel (TheKev316) suggested you speak with him. :) Cheers.


Kevin
The picture kept, will remind me...