/    Sign up×
Community /Pin to ProfileBookmark

count the included row

hello..
please help me on this:

$sel = “select count(A.club) from student A, school B WHERE A.loginID = B.loginID”;
$sel_res = mysql_query($sel) or die(mysql_error($sel));

while ($rs = mysql_fetch_assoc($sel_res)){
if($rs[“category”]!==”Normal”){
foreach($rs as $column){ echo $column; }
}
}

why i cant count the number of the club if the category is not normail..when i use the statement below:
[COLOR=Red]if($rs[“category”]!==”Normal”)
[/COLOR]

thank you so much..

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@rch10007Apr 18.2006 — you have no variable set to do any counting!
×

Success!

Help @d3lia5 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...