Tag Info

New answers tagged

1

As long as you don't have any additional data to store with the "rental" or "sell" property, you don't need a table for it. Just use a COLUMN manage ENUM('rent', 'sale'). Then you have to think about prices. The "BuyMe" price seems simple. Renting Models may have a real interesting live, I mean there are a lot of ideas which come in mind, and much more ideas ...


0

As a quick solution, use the <=> operator, so AND (A.course_type <=> B.course_type). As a real solution, add a column id to course and let something_about_courses show to that id column. EDIT: If you want to get rid of the NULL, you don't need to do that manually. What about UPDATE A set course_type=-1 where course_type IS NULL; UPDATE B ...


0

Try and see if this yields the result you want: SELECT some_description FROM something_about_courses A JOIN courses B ON (A.course_code = B.course_code AND A.course_session = B.course_session AND (A.course_type = B.course_type OR B.course_type IS NULL))



Top 50 recent answers are included