Firstly, assuming your only expecting one result, you don't need a while loop.
Then, instead of echoing the result within the method itself, it should simply return the result. So, this....
while($row = mysql_fetch_array($result)
{
echo "<b>Date: ".$date."</b><p />";
echo "City: ".$row['City']."<p />";
echo "Calendar: ".$Calendar."<p />";
echo '<img src="img/large/'.$row['Img'].'" border="1" /><p />';
echo "Year: ".$row['Year']."<p />";
echo "Make: ".$row['Make']."<p />";
echo "Model: ".$row['Model']."<p />";
echo "Shift: ".$row['Shift']."<p />";
echo "Distance: ".$row['Distance']."<p />";
echo "Price: ¥".$row['Price']."<p />";
echo "Payment method: ".$Paytype."<p />";
}
Should be....
$row = mysql_fetch_array($result);
$return = "
<b>Date: $date</b><br />
City: $row{['City']}<br />
Calendar: $Calendar<br />
<img src='img/large/{$row['Img']}' border='1' /><br />
Year: {$row['Year']}<br />
Make: {$row['Make']}<br />
Model: {$row['Model']}<br />
Shift: {$row['Shift']}<br />
Distance: {$row['Distance']}<br />
Price: ¥{$row['Price']}<br />
Payment method: $Paytype<br />
";
return $return;
Now you can either echo the results of $object->query() or use them in your email.
Not that I also changed all the <p /> tags to <br />. There is no such tag as <p /> in either html or xhtml.
Also, on a side note. I have no idea why this is within a class. Especially one named database. Your method name is also very undescriptive.