www . swmobridgecontest.org/cms/contest
Description of problem:
I am trying link a table containing the teachers and schools into a another table which contains the student/contestant data.
The student table is in 2013contestants
The teacher table is 2013teachers
The teacher and school records could be tied to multiple student records, but the student record can only have one teacher and school.
I _think_ everything is correct, but I'm still learning as I go with both xataface and MySQL.
I keep getting the following error:
- Code: Select all
- Fatal error: Failed parsing SQL query on select: SELECT TeacherID, TeacherName FROM 2013teachers ORDER BY TeacherName .
 The Error was Parse error: Unexpected clause on line 1
 SELECT TeacherID, TeacherName FROM 2013teachers ORDER BY TeacherName
 ^ found: "2" in /home/swmobridge/swmobridgecontest.org/cms/contest/dataface/lib/SQL/Parser.php on line 1765
Fields.ini file in the 2013contestants table folder
- Code: Select all
- [Grade]
 widget:type = select
 vocabulary = Grade
 [TeacherID]
 widget:type = select
 vocabulary = Teacher
valuelists.ini file in the 2013contestants table folder
- Code: Select all
- [Grade]
 FIRST= 1st
 SECOND = 2nd
 THIRD = 3rd
 FOURTH = 4th
 FIFTH = 5th
 SIXTH = 6th
 SEVENTH = 7th
 EIGHTH = 8th
 NINTH = 9th
 TENTH = 10th
 ELEVENTH = 11th
 TWELTH = 12th
 OTHER = Other
 [Teacher]
 __sql__ = "SELECT TeacherID, TeacherName FROM 2013teachers ORDER BY TeacherName"
Table structure cut-n-paste from phpmyadmin
- Code: Select all
- 2013teachers
 Field Type Null Default Comments
 TeacherID int(11) No
 TeacherName varchar(32) Yes NULL
 School varchar(32) Yes NULL
 Indexes:
 Keyname Type Unique Packed Field Cardinality Collation Null Comment
 PRIMARY BTREE Yes No TeacherID 14 A
- Code: Select all
 2013contestants
 Field Type Null Default Comments
 id int(11) No
 date_time datetime Yes NULL
 FirstName varchar(32) No Contestants First Name
 LastName varchar(32) No Contestants Last Name
 Grade varchar(127) Yes NULL
 TeacherID int(11) Yes NULL
 BridgeNumber int(5) Yes NULL
 Disqualified varchar(11) Yes
 Comment varchar(25) Yes NULL
 Indexes:
 Keyname Type Unique Packed Field Cardinality Collation Null Comment
 PRIMARY BTREE Yes No id 5 A
 
		

