MySql - numbers in field names?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Toneboy
Forum Contributor
Posts: 102
Joined: Wed Jul 31, 2002 5:59 am
Location: Law, Scotland.
Contact:

MySql - numbers in field names?

Post by Toneboy »

Was doing a bit of work on something this morning, and was looking to pull data from a table with the fields - "2003rank" and "2004rank", but kept getting parse errors on the line where I was trying to echo the data.

Works fine when I changed them to "lastyear" and "thisyear" - am I right in thinking that you cannot put numbers into a field name?
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

i'm not sure, but mysql maybe doesn't allow numbers in the first character for fieldnames?
Post Reply