0

Can anyone see what is wrong here? This is my first serious attempt at this.

<?php
$query1 = mysql_query("
SELECT topics.url_big, topics.url_small, topics.title, topics.".$egroup.", quiz.passState 
FROM topics 
INNER JOIN quiz 
ON (topics.managerId = quiz.".$managerId.") 
WHERE topics.".$egroup." = 1 
ORDER BY title ASC");
?>
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by facarroll
1

The line

ON (topics.managerId = quiz.".$managerId.")

should read

ON (topics.managerId = quiz.managerId)

By the way: you don't have to exclude PHP variables from double quotes. WHERE topics.$egroup = 1 is easier to read than WHERE topics.".$egroup." = 1

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.