a | b | |
---|
0 | | - | SELECT count(*) |
---|
| 0 | + | SELECT c.course_id, |
---|
| 0 | + | c.course_reference_no, |
---|
| 0 | + | c.course_title, |
---|
| 0 | + | c.currency_id, |
---|
| 0 | + | c.cost, |
---|
| 0 | + | c.program_type_id, |
---|
| 0 | + | c.method_id, |
---|
| 0 | + | c.status_id, |
---|
| 0 | + | c.no_of_days, |
---|
| 0 | + | c.total_hours, |
---|
| 0 | + | c.no_of_participants, |
---|
| 0 | + | c.no_of_batches, |
---|
| 0 | + | c.deadline_for_enrollment, |
---|
| 0 | + | c.course_description, |
---|
| 0 | + | c.course_details, |
---|
| 0 | + | c.trainers_name, |
---|
| 0 | + | c.venue, |
---|
| 0 | + | c.room_no, |
---|
| 0 | + | c.address, |
---|
| 0 | + | c.city_id, |
---|
| 0 | + | c.province_id, |
---|
| 0 | + | c.state_id, |
---|
| 0 | + | c.country_id, |
---|
| 0 | + | c.zipcode, |
---|
| 0 | + | c.contact_details, |
---|
| 0 | + | c.partner_id, |
---|
| 0 | + | c.date_added, |
---|
| 0 | + | c.date_modified, |
---|
| 0 | + | c.date_deleted, |
---|
| 0 | + | c.batch_date_required, |
---|
| 0 | + | c.credits, |
---|
| 0 | + | c.active, |
---|
| 0 | + | c.cost_vat_included, |
---|
| 0 | + | c.cost_not_specified, |
---|
| 0 | + | c.expiration_date, |
---|
| 0 | + | c.special_offer, |
---|
| 0 | + | c.individual_id, |
---|
| 0 | + | con.country_name, |
---|
| 0 | + | pt.program_type_name, |
---|
| 0 | + | cs.status_name, |
---|
| 0 | + | cs.status_description, |
---|
| 0 | + | cm.method_name, |
---|
| 0 | + | cm.method_description, |
---|
| 0 | + | p.company_aka, |
---|
| 0 | + | cur.name, |
---|
| 0 | + | cat.category_name, |
---|
| 0 | + | ps.province_name, |
---|
| 0 | + | st.state_name, |
---|
| 0 | + | cy.city_name, |
---|
| 0 | + | p.partner_name, |
---|
| 0 | + | pi.lastname, |
---|
| 0 | + | pi.firstname, |
---|
| 0 | + | CONCAT(CONCAT(pi.lastname, ' , '), pi.firstname) AS fullname, |
---|
| 0 | + | esched.* |
---|
... | |
---|
1 | 1 | | FROM courses c |
---|
2 | 2 | | LEFT JOIN course_methodologies cm |
---|
3 | 3 | | ON cm.method_id = c.method_id |
---|
... | |
---|
27 | 27 | | ON pi.user_id = c.user_id |
---|
28 | 28 | | LEFT JOIN users u |
---|
29 | 29 | | ON u.user_id = c.user_id |
---|
... | |
---|
30 | | - | WHERE 1 = 1 AND c.course_type = 1 AND active = 1 AND c.country_id = 52 |
---|
30 | | - | AND ((('2010-10-01 00:00:00' <= esched.date_start |
---|
30 | | - | AND esched.date_start <= '2010-11-04 00:00:00') |
---|
30 | | - | OR ('2010-10-01 00:00:00' <= esched.date_end |
---|
30 | | - | AND esched.date_end <= '2010-11-04 00:00:00')) |
---|
30 | | - | OR ((esched.date_start <= '2010-10-01 00:00:00' |
---|
30 | | - | AND '2010-10-01 00:00:00' <= esched.date_end) |
---|
30 | | - | OR (esched.date_start <= '2011-10-04 00:00:00' |
---|
30 | | - | AND '2010-11-04 00:00:00' <= esched.date_end))) |
---|
| 30 | + | WHERE 1 = 1 |
---|
| 30 | + | AND c.course_type = 1 |
---|
| 30 | + | AND active = 1 |
---|
| 30 | + | AND c.country_id = 52 |
---|
| 30 | + | AND c.course_title LIKE '%cook%' |
---|
| 30 | + | AND cat.main_category_id = 40 |
---|
| 30 | + | AND cat.category_id = 360 |
---|
| 30 | + | AND ((('2010-09-01 00:00:00' <= esched.date_start |
---|
| 30 | + | AND esched.date_start <= '2010-09-25 00:00:00') |
---|
| 30 | + | OR ('2010-09-01 00:00:00' <= esched.date_end |
---|
| 30 | + | AND esched.date_end <= '2010-09-25 00:00:00')) |
---|
| 30 | + | OR ((esched.date_start <= '2010-09-01 00:00:00' |
---|
| 30 | + | AND '2010-09-01 00:00:00' <= esched.date_end) |
---|
| 30 | + | OR (esched.date_start <= '2010-09-25 00:00:00' |
---|
| 30 | + | AND '2010-09-25 00:00:00' <= esched.date_end))) |
---|
| 30 | + | GROUP BY c.course_id |
---|
| 30 | + | ORDER BY c.course_id DESC |
---|
... | |
---|