please run the following in your own test database --
Code:
CREATE TABLE 937
( i INTEGER
, x VARCHAR(9)
);
that should give you an error
why? because a table name consisting of numerics needs to be escaped
now try this --
Code:
CREATE TABLE `937`
( i INTEGER
, x VARCHAR(9)
);
that should work
did you notice a difference? the table name is escaped by backticks
okay, now let's insert some rows --
Code:
INSERT INTO `937` VALUES ( 1,'a' ) , ( 2,'b' );
works, right?
and we can select, too --
Code:
SELECT x,i FROM `937`;
now, once you have run these, and confirmed that everything works, please go back to your code and remember that if your table name is numeric, you must always escape it
which is why i suggested thqat you rename it to
t2009, because then you don't need the backtick nonsense all da time

Bookmarks