I am new to mysql programming. I have set up a database with a table called "2009". I have 2 rows with about 16 fields. I have data stored in these two rows.
I have some code that tells me this table exists. Below that code I have this code:
I get this error: "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 '2009'". The error is in the second line because when I comment it out, I don't get the error.
$sql = "SELECT * FROM 2009";
$result = mysql_query($sql, $conn) or die(mysql_error());
I have a number of books on MySQL, and I have tried many different ways to retrieve data from the data base, but I am constantly getting errors. The above code is simple code that produces this error.
What am I doing wrong?
I will appreciate any help I can get. I have spent all morning trying to get something to work.