Jump to content

why aren't all of the rows showing up?


acidglitter

Recommended Posts

on my site candy adds (http://candyadds.com/), the main page shows the vip members. ever since i added some new code that looks at how long they have left, its been having problems. its like my site gives up on running the entire mysql query and only shows half of the members. i have to hit refresh at least 5 times before it shows everyone.. does anyone know how i can fix this?

 

this is the query...

 

SELECT *,
HOUR(TIMEDIFF(vip,NOW())) AS 'hours',
MINUTE(TIMEDIFF(vip,NOW())) AS 'minutes'
FROM members
WHERE TIMEDIFF(vip, NOW()) >= 0
AND TIMEDIFF(vip, NOW()) REGEXP ! '-'
AND friendid NOT IN ($featuredspaces)	
GROUP BY friendid
ORDER BY DATEDIFF(DATE(vip), CURDATE()) DESC,
SUBTIME(TIME(vip), CURTIME()) DESC

Link to comment
https://forums.phpfreaks.com/topic/93151-why-arent-all-of-the-rows-showing-up/
Share on other sites

Ugh.

 

thankyou for your helpful reply and wonderful solution

 

 

Please run an EXPLAIN on this and post the results.

 

i.e.

EXPLAIN <rest of the select query here>

 

what is supposed to show up from adding EXPLAIN? everything thats showing up now is an error message..

Notice: Undefined index: hours in

Notice: Undefined index: minutes in

Notice: Undefined index: friendid in

  • 2 weeks later...
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.