sorry to bring up another old post, but i don't want to start a new one on the subject, when all the info is above.
Theres two sections to the site, a private section and a global section. In these sections, customer complaints are displayed in tables. In the private secton, the content is specific to the login name, and in the global section, the content is all the complaints from all users.
Using the above code:
$index = $row ["complaintID"];
echo "<a href = detailed.php?id = $index>" . $row ["problemSummary"] . "</a>";
Then on detailed.php, to retreive and display the complete complaint form:
$result = mysql_query("select * from complaints where complaintnumber = ' $_GET[id]' ")
I've just been told that in the private section, the complaintnumber is unique, but in the public section, there may be more than one of the same complaintnumber.
Using this script works fine for the private section, but when in the public section, it will retreive and display two or more complaints if they have the same id.
by adding into the mysql statement:
AND customerid = $Name
will only then retreive the complaint of the name the user logged in as, therefore defeating the point of having a global complaints section.
I've also tried LIMIT 1, but it only retreives the first one it finds.
Is there any way around this?