Hello Everyone,
I am write you to ask for your help, I can not figure out for the life
of me why this does not work the way it should:
$fin = "123456789";
$keyword = "%blind%";
when the insert - select statement runs its suppose to check to see if
EIN = '$fin' AND PNO = '$keyword' IF it finds match its suppose to run
the if statement and if it don't find a match it then runs the else
statement
Start Code:
echo "There was no record found in the table \"allow\", we are now
checking if record ". $i ." matchs the required criteria!<br />";
$query_is = "INSERT INTO irs_query SELECT * FROM irs_rawdata WHERE
EIN='$fin' AND PNO='%blind%'";
$result_is = mysql_query($query_is) OR die("Sorry was unable to insert
and select the records from the db table irs_rawdata! <br />" .
mysql_error());
if ($query_is = TRUE)
{
echo "The record matched the criteria, we have added it to the
\"irs_query\" table and deleted it from \"irs_rawdata\"!<br />";
$query_d = "DELETE FROM irs_rawdata WHERE EIN = '$fin'";
$result_d = mysql_query($query_d) OR die("Was unable delete ". $fin
." from the db table irs_rawdata! <br />" . mysql_error());
}
else
{
echo "The record did't match the criteria, we have added it to the
\"block\" table and deleted it from \"irs_query\"!<br />";
$query_i = "INSERT INTO block (fin, who_blocked) VALUES ('$fin',
'S-123456789')";
$result_i = mysql_query($query_i) OR die("Sorry was unable to insert
".$fin." into the database table allowed! <br />" . mysql_error());
$query_d = "DELETE FROM irs_rawdata WHERE EIN ='$fin'";
$result_d = mysql_query($query_d) OR die("Was unable to delete
".$fin." from the db table irs_rawdata! <br />" . mysql_error());
}
End Code
Sincerely,
Christopher