Hi
I used the above code to display the most recent record and it works nicely. I want to develop this and make the most recent record only appear if it has a certain value for a certain column.
I tried doing this:
<?php
mysql_connect ("qqqq","qqqqq","qqqqq");
mysql_select_db("qqqqq");
$result = mysql_query ("SELECT * FROM reviews WHERE visible="Y" ORDER BY reviewID DESC LIMIT 1");
if ($row = mysql_fetch_array($result)) {
do {
$rating = $row["rating"];
$title = $row["title"];
$review = $row["review"];
$name = $row["name"];
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>
As you can see I added "WHERE visible="Y" ", but I get error message: parse error, unexpected T_STRING
Any ideas?