|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP/MySQL problem with UNION
Hi,
I have a problem with following mySQL-statement: "(SELECT *, beitraege.id AS nr FROM beitraege, tipper WHERE tipper_id = tipper.id AND forum_id = 1 AND beitraege.id > 72 ORDER BY gesendet ASC LIMIT 5) UNION (SELECT *, beitraege.id AS nr FROM beitraege, tipper WHERE tipper_id = tipper.id AND forum_id = 1 AND beitraege.id <= 72 ORDER BY gesendet DESC LIMIT 10) ORDER BY gesendet DESC;" It is surprising that it's not a problem on my local environment but results in following error message on my host server: "error: 1064 - You have an error in your SQL syntax near '(SELECT *, beitraege.id AS nr FROM beitraege, tipper WHERE ' at line 2" Does somebody know how to get rid of this error message...???? btw: the same statement without UNION works... Thanx for your help!!! BR schwagomat |
|
#2
|
||||
|
||||
|
RE: PHP/MySQL problem with UNION
What version of MySQL sre you using? UNION was added in 4.0.0
|
|
#3
|
|||
|
|||
|
RE: PHP/MySQL problem with UNION
honcho,
thank you very much for your hint, that's it!!! My host uses version 3.23.44 Thanx again schwagomat |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > PHP/MySQL problem with UNION |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|