I'm about ready to pull my hair out, I can not figure out why this is giving me an error, I do all my other SQL queries like this without a single problem. What am I missing here?
<?php
require_once('config.php');
$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysql_select_db("tpeoria_main", $con);
$result = mysql_query("SELECT * FROM message WHERE to=1");
while($row = mysql_fetch_array($result)){
echo "<tr><td>".$row['from']."</td><td>".$row['body']."</td></tr>";
}
mysql_close($con);
?>