My php code is executing successfully despite an error message popping up. The code deletes a row from one of my tables but the following error message is displayed:
Error: 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 '1' at line 1
My php code is as follows:
<?php
$id = $_GET['meeting_id'];
$username = $_GET['username'];
$result = mysql_query("DELETE FROM attendees WHERE meeting_id = '$id' AND username = '$username'")
or die(mysql_error());
if (!mysql_query($result))
{
die('Error: ' . mysql_error());
}
else
{
echo '<h2>The User Has Been Removed From The Meeting</h2>';
}
?>
Can anyone see a solution here? thanks