ok im trying to count how many new pms a user has my code so far:
<?php
session_start();
include "config.php3";
include "dbconnect.php3";
$b = $_SESSION['bat'];
$cntpms = "SELECT COUNT(*) FROM $table4 WHERE id='$b', red='0'";
$count = mysql_query($cntpms)or die(mysql_error());
echo "$count";
?>
the output
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' red='0'' at line 1