could someone help me fix the below code please:
$decision = mysqli_real_escape_string($conn, $_POST['decision']);
$sql = "SELECT * FROM user1 WHERE 'fao' LIKE '%decision%' AND id NOT IN
(SELECT id FROM assigned)";
$result=mysqli_query($conn, $sql);
fao
field only ever has two values, Nurse
or Dietitian
. The issue is with my SELECT
statement. In the assigned
table, there are two columns, an id
value and the name of a user. What I am trying to do is if the id
value exists in 'assigned' table, then I would like to remove this from the results of SELECTing all from 'user1'. I am then echoing these results into a table. Thanks!