ok i did this

<?php
$query = "SELECT * FROM messages2";
$sqlinbox = mysql_query($query);

//Error thingy, ohh no! Dispaly the error and the query so we can diagnose the problem if there is one
if(!$sqlinbox)
{
?>
<p><?php print '$query: '.$query.mysql_error();?></p>
<?php
}
else
{
echo 'yes it is';
}



and it echos yes it is!