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");
?>

Recommended Answers

All 2 Replies

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

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.