MySQL error
Posted: Sun Jun 08, 2008 11:55 am
Without showing my database info when I run this script it says this error message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Show Archives' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Show Archives' at line 1
Code: Select all
<?php
// Connects to your Database
$data = mysql_query("SELECT * FROM Show Archives")
or die(mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>Show Name</th> <td>".$info['showname'] . "</td> ";
Print "<th>Date</th> <td>".$info['date'] . " </td></tr>";
Print "<th>Main Event</th> <td>".$info['mainevent'] . " </td></tr>";
}
Print "</table>";
?>