Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count function ignores where statement

Status
Not open for further replies.

gavray

Programmer
Jul 17, 2000
65
GB
Hi,

I'm using mySQL with ASP. This count function is really frustating because it counts all the records in the database. It ignores the where statement NowLive=1 .

Any ideas?

sSQL2="SELECT COUNT(ArtistNameTable2.NowLive) AS results_count"
sSQL2=sSQL2 & " FROM ArtistNameTable2"
sSQL2=sSQL2 & " WHERE NowLive=1"

Many thanks.

Gavin

the boho from soho
 
Thanks,

I've tried it via my admin tool and it picks up the LiveNow row with only 1 in it.

The column type is TINYINT, length 1, default 0, not null

I can't understand it.

gavin

the boho from soho
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top