Using the NOT IN function
I am using "NOT IN" in this query and by all references to documentation, it should be working. Unfortunately it is not. Can someone please tell me why? Thanks!
<?php
// Get duties that are not currently part of the project
$new_duty_query = mysql_query("SELECT duty_id, duty_description FROM duties WHERE duty_id NOT IN (SELECT duty_id FROM duties_to_projects WHERE project_id = ".$_GET['project_id'].")");
while ($new_duty = mysql_fetch_array($new_duty_query, MYSQL_ASSOC)) {
echo
'<tr>
<td>'.$new_duty['duty_description'].'</td>
</tr>';
}
?>
Subject
Written By
Posted
Using the NOT IN function
April 27, 2006 09:16AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.