0

Hi, i am working on a member database. I need to get all the registrations except the current week. I have a "week" field in my database.

This one is fine and echos all the records from week 1 to 8:

SELECT COUNT(*) FROM agents WHERE week < 9  and status = Active

But when it transfered to a 2 digit value it returns 0 result:

SELECT COUNT(*) FROM agents WHERE week < 10  and status = Active

I've been here for sometime to no avail.

Thanks a lot guys!

Edited by codewalkz: correction

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by rajabhaskar525
-1

what is the use of COUNT(*).

SELECT COUNT(*) FROM agents WHERE week < 9  and status = Active

. why do u use count(*).

0

ok. i uderstood. you want to get total no rows.

SELECT COUNT(*) FROM agents WHERE (week < '9'  and status = 'Active'

. try like this

Edited by rajabhaskar525: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.