Jump to content

Recommended Posts

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)
	}
}

Link to comment
https://forums.phpfreaks.com/topic/55129-solved-debug-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.