WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-16-2003, 01:20 AM
Leisa's Avatar
Leisa Leisa is offline
WebProWorld Veteran
 

Join Date: Nov 2003
Location: Missouri, USA
Posts: 312
Leisa RepRank 0
Default PHP/MySQL Miscount

Hello. My site contains categories and sub-categories of information. When you click on a category, the number of records matched is displayed next to the sub-categories that come up. But, something has gone screwy. When you go to view those records, the number of results is not the same. Now, this isn't happening everywhere, only for a few sub-cats.

For example, go to http://supplierlocator.com/1001.php and look at the first sub-category "General Apparel, Accessories, etc.". The number of records is 15. When you click on the sub-cat you can see the number of records returned is only 14.

I haven't touched the code for this aspect of the site since I finished working on it a year ago. It was fine before. The only thing I do on a regular basis is back-end database maintenance. It has to be something I'm doing when I modify records in the database. I could use some guidance!
__________________
Leisa
Wholly Wholesale - Wholesale Auctions - http://whollywholesale.com
eStoreFinder.com - eCommerce Store Directory - http://eStoreFinder.com
WholesaleLowdown.com - A Guide for Retailers - http://wholesalelowdown.com
Reply With Quote
  #2 (permalink)  
Old 12-16-2003, 02:58 AM
cyanide cyanide is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

Hi Leisa,

It's a little difficult to say without looking at the code or database.
However, since you haven't messed with the code and this problem hasn't occurred anywhere else...

Lemme throw a few things out...
Have you tried to track down the table that calls this category? -to maybe find this mysterious 15th.

Could it be that a new registrant accidentally clicked the register button without filling out all fields? The main category could recognize this as a numbered id, but the sub-cat doesn't recognize it because it might be calling the entries by company name, which in this case doesn't exist?

oh man, I was thinking of something else as well, but alas ... lost my train of thought
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #3 (permalink)  
Old 12-16-2003, 03:03 AM
Leisa's Avatar
Leisa Leisa is offline
WebProWorld Veteran
 

Join Date: Nov 2003
Location: Missouri, USA
Posts: 312
Leisa RepRank 0
Default

Quote:
Originally Posted by cyanide
Have you tried to track down the table that calls this category? -to maybe find this mysterious 15th.
While digging for the answer to the above question, I discovered that there are actually 16 records that match Apparel>General Apparel...Hmmm...Digging deeper...
__________________
Leisa
Wholly Wholesale - Wholesale Auctions - http://whollywholesale.com
eStoreFinder.com - eCommerce Store Directory - http://eStoreFinder.com
WholesaleLowdown.com - A Guide for Retailers - http://wholesalelowdown.com
Reply With Quote
  #4 (permalink)  
Old 12-16-2003, 03:26 AM
Leisa's Avatar
Leisa Leisa is offline
WebProWorld Veteran
 

Join Date: Nov 2003
Location: Missouri, USA
Posts: 312
Leisa RepRank 0
Default

I got it and oh man do I feel stupid. Well, I had deleted one part of a record for a listing but not the other...so, it matched the sub-cat query but didn't have everything it needed to be shown the sub-cat results display. Um, hard to explain. Thanks cyanide!!!!
__________________
Leisa
Wholly Wholesale - Wholesale Auctions - http://whollywholesale.com
eStoreFinder.com - eCommerce Store Directory - http://eStoreFinder.com
WholesaleLowdown.com - A Guide for Retailers - http://wholesalelowdown.com
Reply With Quote
  #5 (permalink)  
Old 12-16-2003, 03:33 AM
cyanide cyanide is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

Quote:
Originally Posted by Leisa
I got it and oh man do I feel stupid. Well, I had deleted one part of a record for a listing but not the other...so, it matched the sub-cat query but didn't have everything it needed to be shown the sub-cat results display. Um, hard to explain. Thanks cyanide!!!!
glad yougot it figured out !!
actually, that was what I was trying to spit out.
You're right, hard to explain, but it depends on which field the script is calling.

Your welcome
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: miscount, phpmysql



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Search Engine Friendly URLs by vBSEO 3.0.0