According to the definition, DELETE is a built-in funtion that deletes row(s) dependant on what (if any) citeria is specified. The funtion returns the number of records that were deleted. How can I get at this number?
$sql = "DELETE FROM members WHERE FirstName='".$FirstName."' AND LastName='".$LastName."'";
echo $sql;
this displays the actual query, which I used for debugging.
$sql = "DELETE FROM members WHERE FirstName='".$FirstName."' AND LastName='".$LastName."'";
$result = mysql_query($sql) or die(mysql_error());
echo $result;
this always returns a value of 1, regardless of how many records are deleted.
$sql = "DELETE FROM members WHERE FirstName='".$FirstName."' AND LastName='".$LastName."'";
$result = mysql_query($sql) or die(mysql_error());
$NumRecords = mysql_num_rows($sql);
echo "<br><br>".$NumRecords."<br><br>";
and this doesn't display any value for $NumRecords. But I know the echo is being executed because I can see the <br> tags in the page's source.