That is one bloody complex query :).
As far as I know, MySQL does not support RIGHT JOIN leyword, so that's where
it's failing. Someone slap me if I'm wrong.
It may be possible to fetch the results you want without such a hairy query.
Just include a partial dump of involved tables and concise desctiption of
what you're trying to select. Otherwise, I don't have guts to look into that
huge query myself! Hopefully someone will! :-P
Sherzod
:
:
: > Hi All,
: >
: > Can anyone help me get this query working in MySQL, this
: was created using
: > Access, but it doesn't port well for MySQL syntax:
: >
: > SELECT basket.id,
: > products.part_code,
: > products.product_type,
: > products.description,
: > product_options_1.options,
: > basket.price, basket.quantity,
: > basket.price*basket.quantity AS total
: > FROM (products LEFT JOIN product_options ON
: > products.prod_id=product_options.prod_id)
: > RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN
: (basket_header
: > INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON
: > product_options_1.po_id=basket.op_id) ON
: products.prod_id=basket.prod_id
: > GROUP BY basket.id, products.part_code, products.product_type,
: > products.description, product_options_1.options, basket.price,
: > basket.quantity, basket.price*basket.quantity,
: basket_header.basket_id,
: > products.options
: > HAVING (((basket_header.basket_id)=4));
: >
: > Here is the error message MySQL reports:
: >
: > ERROR 1064: You have an error in your SQL syntax near
: '(product_options AS
: > product_options_1 RIGHT JOIN (basket_header INNER JOIN
: baske' at line 9
: >
: > Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas
: to the correct
: > syntax?
: >
: > Thanks,
: >
: > Kevin
: >
:
:
: ---------------------------------------------------------------------
: Before posting, please check:
: http://www.mysql.com/manual.php (the manual)
: http://lists.mysql.com/ (the list archive)
:
: To request this thread, e-mail <[EMAIL PROTECTED]>
: To unsubscribe, e-mail
: <[EMAIL PROTECTED]>
: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
:
:
:
:
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php