Again I have no idea what you are doing and why you are even using loops if you are doing LIMIT 1, but maybe this will steer you in the right direction.
PHP Code:
<?php
$servername = "localhost";
$username = "user";
$password = "pass";
$dbname = "db";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$result = $conn->query("SELECT * FROM Table WHERE Body != '' LIMIT 1");
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$sresult = $conn->query("SELECT * FROM Table WHERE Keyword != '' LIMIT 1");
while($srow = $sresult->fetch_assoc()) {
echo "<a href=\"urldotcom\">".$srow['Keyword']."</a>";
}
}
} else {
echo "0 results";
}
?>