Here is my PHP code:
$cl_app_rs = $conn->Execute ( "SELECT COUNT(match_squad.player_id) as cl_app, player_fname, match_type, type_id FROM player, match_squad, matches, type_match WHERE match_squad.player_id=player.player_id AND player.player_id=" . $_GET['player_id'] . " AND matches.match_type=type_match.type_id AND type_match.type_id=2 GROUP BY player_fname ORDER BY player.player_id" ) or die ( $conn->ErrorMsg() );
$fa_app_rs = $conn->Execute ( "SELECT COUNT(match_squad.player_id) as fa_app, player_fname, match_type, type_id FROM player, match_squad, matches, type_match WHERE match_squad.player_id=player.player_id AND player.player_id=" . $_GET['player_id'] . " AND matches.match_type=type_match.type_id AND type_match.type_id=3 GROUP BY player_fname ORDER BY player.player_id" ) or die ( $conn->ErrorMsg() );
I'm trying in the HTML below to get two rows
$cl_app
$fa_app
But if $cl_app = 0 and $fa_app = 1 it shows 1 in the both columns. What is wrong with my query?
Also, how do I get something in a IF statement that is not equal.
Like if $var 1 doesn't equal $var2