Jump to content

mysql query via odbc fails


webguy262
 Share

This topic is 4361 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

This query works in phpmyadmin, but gets a syntax error when I run it in FileMaker via the 3.51 OBDC connector. Any thoughts?

SET SESSION SQL_BIG_SELECTS=1; SELECT DISTINCT orders.customers_id, orders.customers_name, orders.date_purchased, orders_products.orders_products_id,

orders_products.orders_id, orders_products.products_id, orders_products.products_model, orders_products.products_name, orders_products.products_price, orders_products.final_price, orders_products.products_payment_type, orders_products.products_tax, orders_products.products_quantity, orders_status_history.comments, orders_products_attributes.products_options_values FROM orders_products LEFT JOIN orders ON orders.orders_id = orders_products.orders_id LEFT JOIN orders_status_history ON orders_status_history.orders_id = orders_products.orders_id LEFT JOIN orders_products_attributes ON orders_products_attributes.orders_id = orders_products.orders_id WHERE orders.date_purchased > 20110225000000

The syntax error just references the "SELECT DISTINCT ..." opening of the query.

BTW, another long query we use works fine via FileMaker/ODBC. Here it is...

SELECT customers.customers_id,customers.customers_type,customers.customers_add_date,customers.customers_name_check,customers.customers_gender,customers.customers_firstname,customers.customers_lastname,customers.customers_coach_type,customers.customers_dob,customers.customers_email_address,customers.customers_default_address_id,customers.customers_telephone,customers.customers_fax,customers.customers_password,customers.customers_mother_first_name,customers.customers_mother_last_name,customers.customers_father_first_name,customers.customers_father_last_name,customers.customers_grad_year,customers.customers_height_feet,customers.customers_height_inches,customers.customers_shoe_size,customers.customers_court_position,customers.customers_birth_month,customers.customers_birth_day,customers.customers_birth_year,customers.customers_phone_area_code,customers.customers_phone_exchange,customers.customers_phone_number,customers.customers_school_team,customers.customers_school_phone,customers.customers_hs_coach_first_name,customers.customers_hs_coach_last_name,customers.customers_hs_coach_email,customers.customers_hs_coach_phone,customers.customers_hs_coach_cell_phone,customers.customers_aau_team_name,customers.customers_aau_team_age,customers.customers_aau_coach_first_name,customers.customers_aau_coach_last_name,customers.customers_aau_coach_email,customers.customers_aau_coach_phone,customers.customers_aau_coach_cell,customers.customers_coach_first_name,customers.customers_coach_last_name,customers.customers_coach_email,customers.customers_coach_phone,customers.customers_coach_cell,customers.customers_sat_total_score,customers.customers_act_composite_score,customers.customers_psat_total_score,customers.customers_gpa,customers.customers_college_choice,customers.customers_newsletter,address_book.address_book_id,address_book.customers_id,address_book.entry_gender,address_book.entry_company,address_book.entry_firstname,address_book.entry_lastname,address_book.entry_street_address,address_book.entry_suburb,address_book.entry_postcode,address_book.entry_city,address_book.entry_state,address_book.entry_state_other,address_book.entry_country_id,address_book.entry_zone_id FROM customers LEFT JOIN address_book ON customers.customers_id = address_book.customers_id WHERE customers.customers_type = 0 AND customers.customers_add_date > 20110224000000 AND customers_firstname = entry_firstname GROUP BY customers.customers_id

Link to comment
Share on other sites

This topic is 4361 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.