Jump to content

[SOLVED] Quick count(*) question....


drbigfresh

Recommended Posts

I am running the following query:

 

select d_list.listname,  d_list.created, d_list.id, (select count(id) from d_list_item where d_list.id=d_list_item.listid) as itemcount from d_list where active='Y' and itemcount >0  order by created desc

 

which works, but it keeps returning items with an itemcount of 0, even though it should only show items with an itemc ount > 0 (all of the itemcount numbers are correct though.) It seems that is is just ignoring the 2nd part of the where clause.

 

I've looked at it for over an hour now, and can't figure it out....

 

 

Link to comment
https://forums.phpfreaks.com/topic/85444-solved-quick-count-question/
Share on other sites

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.