thefortrees Posted June 11, 2007 Share Posted June 11, 2007 Arg! I'm getting unexpected T_INC on line 73, expecting ')'. (The error is in the line where the for loop is initiated in the 2nd function). But I can't see where I left out any parentheses, semi colons, or anything else... I'd appreciate any help!!! //Queries clients and tracker table to see which companies haven't filled out the table. function notFilledout(){ $query = "SELECT clients.company FROM clients WHERE clients.company NOT IN(SELECT tracker.company FROM tracker);"; $result = mysql_query($query) or die("Query failed" . mysql_error()); echo "<br><br><br>" ."<h1>Companies - not filled out</h1>" ."<br><table class = \"table\" border cellpadding = 4 align = \"center\">" . "<tr><th>Company</th></tr>"; //While still rows in result set, fetch current row into array $row. while ($row = mysql_fetch_assoc($result)){ echo "<tr><td>".$row['company']."</td></tr>"; } echo "</table>"; } //Queries answers and clients table to see who answered questionIDs 7-14 with 3 or less. function rateService(){ echo "<table class = \"table\" border cellpadding = 4 align = \"center\">"; for ($i = 7; $i < 15; i++){ $query = "SELECT answers.answer, clients.company FROM answers, company WHERE questionID = '$i' AND answers.passcode = clients.passcode;"; $result = mysql_query($query); $int = (int) $result['answer']; //if ($int <= 3) } } Quote Link to comment https://forums.phpfreaks.com/topic/55129-solved-debug-help/ Share on other sites More sharing options...
spooke2k Posted June 11, 2007 Share Posted June 11, 2007 please highlight what line that number is thanks Quote Link to comment https://forums.phpfreaks.com/topic/55129-solved-debug-help/#findComment-272531 Share on other sites More sharing options...
Wildbug Posted June 11, 2007 Share Posted June 11, 2007 I don't see anything wrong with that snippet, but (if I didn't miss it) it could be anywhere in the program, not just nearby. But you shouldn't include terminating semi-colons inside your MySQL queries when running them through PHP. Quote Link to comment https://forums.phpfreaks.com/topic/55129-solved-debug-help/#findComment-272535 Share on other sites More sharing options...
Wildbug Posted June 11, 2007 Share Posted June 11, 2007 Oh, I see it -- you need to change "i" to "$i" in that for loop line. Quote Link to comment https://forums.phpfreaks.com/topic/55129-solved-debug-help/#findComment-272537 Share on other sites More sharing options...
thefortrees Posted June 11, 2007 Author Share Posted June 11, 2007 Thanks! I caught it just as you posted that. Appreciate your help. Quote Link to comment https://forums.phpfreaks.com/topic/55129-solved-debug-help/#findComment-272544 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.