HI
I been trying to retrieve data from a mysql and display it on my display page by doing,
$result = mysql_query("SELECT resources. resource_id, resources. type, resources. authors, resources. title, resources. publisher, resources. year, resources. editor, resources. url, resources. keyword, resources. dis_isbn, resources. dis_issn, unit_list. resource_id, unit_list. unit_id, unit_list. status
FROM resources, unit_list
WHERE unit_id = '$module' and status = 'recommended' and type ='book' AND resources . resource_id = unit_list. resource_id", $dbid);
while ($row = mysql_fetch_row($result)) {
$author= $row[2];
$year = $row[5];
$title = $row[3];
$publisher=$row[4];
$isbn= $row[9];
$display.= "$author, $year, $title, $publisher, $isbn<br>";
echo "$display";
}
However, this repeats most of the fields it retrieves. I only have four records in the database and it repeats 3 of them.
Does any one know why the fields are being repeated, or another way of doing this.
I don't want to place the records in a table, as this leaves gaps between the fields.
Thanks in advance for any help
Cheers
Chris