Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT (Name) FROM (table_lessons,table_rasp) WHERE (table_rasp.Lesson1 =
- table_lessons._id);
- SELECT (Name) FROM table_lessons,table_rasp WHERE table_rasp.Lesson2 =
- table_lessons._id;
- SELECT (Name) FROM table_lessons,table_rasp WHERE table_rasp.Lesson3 =
- table_lessons._id;
- SELECT Name, 1 sorting_order
- FROM table_lessons,table_rasp
- WHERE table_rasp.Lesson1 = table_lessons._id
- UNION ALL
- SELECT Name, 2
- FROM table_lessons,table_rasp
- WHERE table_rasp.Lesson2 = table_lessons._id
- UNION ALL
- SELECT Name, 3
- FROM table_lessons,table_rasp
- WHERE table_rasp.Lesson3 = table_lessons._id
- ORDER BY sorting_order /* , Name */ ;
- SELECT (Name) FROM (table_lessons,table_rasp)
- WHERE
- ((table_rasp.Lesson1 = table_lessons._id)
- or
- (table_rasp.Lesson2 = table_lessons._id)
- or
- (table_rasp.Lesson3 = table_lessons._id));
Add Comment
Please, Sign In to add comment