Problem displaying table with foreign keys
-
I’m trying to display a table ‘class’ which has a foreign key linking it to table teachers. The shortcode I use:
[abase table=”class”
columns=”id_class,name,id_teacher”
]I got the following error:
#1. [abase table=”class” columns=”id_class,name,id_teacher”]
Fatal Error (1139)
Unknown column ‘teachers.id_teacher’ in ‘on clause’
Check to make sure the upper and lower case spelling of your table and column names are all exactly correct. Valid table names in szkola: class, dzieci, klasy, nauczyciele, platnosci, rejestracja, rodzice, teachers.SELECT * FROM class LEFT JOIN
teachers
ASclass$id_teacher$teachers
ONclass
.id_teacher=class$id_teacher$teachers
.id_teacher LEFT JOINteachers
ASteachers$id_teacher$teachers
ONteachers
.id_teacher=teachers$id_teacher$teachers
.id_teacher table_error = ” cols_in = ” fields_in = ” columns_in = ‘id_class,name,id_teacher’ form = ”I didn’t even want to display values from different tables at this point, just display values from a table that has foreign keys.
Is it possible to add <rlink> to an <sql> attribute? In other words I’d like the functionality of a table, but use my own sql query.
- The topic ‘Problem displaying table with foreign keys’ is closed to new replies.