Can someone tell me what I am doing wrong here?
I'm trying to check if the date is already in the database, and if it isn't, then I insert the new row, but it doesn't do anything...
$sql = "select * from archive_issue";
$result = mysql_query($sql);
while ($owners = mysql_fetch_array($result)) {
$date2=$owners['date'];
if ($date2 = $date){ }else{
$SQL = " INSERT INTO archive_issue ";
$SQL = $SQL . " (volume, issue, date) VALUES ";
$SQL = $SQL . " ('$volume', '$issue', '$date')";
$result3 = mysql_db_query($db,"$SQL",$connect);
if (!$result3) {
echo("ERROR: " . mysql_error() . "\n$SQL\n");
}else{
}
}
}