InABoxPr Posted June 15, 2011 Share Posted June 15, 2011 Im not great in SQL, so im not positive on how to fix this code. Im trying to make it select everything instead of just "tasks" so later i can use it like: ect.. $fetch = mysql_fetch_assoc($sql); echo($fetch['TaskID']); SELECT Tasks.Task as Task from Tasks WHERE Tasks.ID NOT IN (SELECT complete.TaskID FROM complete WHERE complete.UserID = '1' And heres the PHP code im using to execute the sql code. $sql = mysql_query("SELECT Tasks.Task as Task from Tasks WHERE Tasks.ID NOT IN (SELECT complete.TaskID FROM complete WHERE complete.UserID = '1')") or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
sunfighter Posted June 15, 2011 Share Posted June 15, 2011 $sql = mysql_query("SELECT * from Tasks ") or die(mysql_error()); You should stop and read these: http://www.tizag.com/mysqlTutorial/index.php and: http://www.w3schools.com/php/php_mysql_intro.asp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.