hi,
ok basically I am writing a code that when someone updates some info, it will do that and then insert a message into the updates section. Now everything works fine except that if someone does alot of updates in one day it will continue to post the same message over and over again in the updates section. So what I need to do (i think) is make it check the row, and see if it contains the message...but how I do this is beyond me. So if anyone can help me then please do, and below is some of my code.
// now to insert this into the updates section
if($joindate2 !== "$date"){
$SQL = "INSERT INTO updates (UPDATES,DATE) VALUES('$posted','$joindate2')";
// echo $SQL;
$result = @mysql_query($SQL) or die(mysql_error());
echo "'Roster Updated' Added To Recent Updates.\n";
}
// If this has already been updated today then display the message and don't update
elseif( What Should Go Here? ){
echo "Roster Has Already Been Updated Today so does not need re-added to the recent updates section";
}
// If there is already some updates on the same day this will insert it into the same day
else{
$SQL = "UPDATE updates SET DATE='$date',UPDATES='$updates $posted' WHERE ID=$id";
thanks in advance to anyone that can help me