MySql error

    Date: 02/24/07 (PHP Community)    Keywords: mysql, sql, linux

    I'm getting an puzzling error in a mysql query. The thing is that locally, on my Windows NT server, it works, but when I install the program on my host, which runs Linux, it says me the query is wrong.

    The error message I'm getting is : "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(SELECT ncis_series_cats.series_id FROM ncis_series_cats WHERE"

    And my query is:
    SELECT ncis_chapters.story_id, ncis_stories.series_id, ncis_series.user_id, ncis_series.series_title, ncis_series.series_rating, ncis_series.series_summary, ncis_series.series_notes, DATE_FORMAT(ncis_series.series_date, '%d/%m/%Y') AS date_f, ncis_series.series_complete, ncis_users.name FROM ncis_chapters LEFT JOIN ncis_stories ON ncis_chapters.story_id = ncis_stories.id LEFT JOIN ncis_series ON ncis_series.id=ncis_stories.series_id LEFT JOIN ncis_users ON ncis_users.id=ncis_series.user_id WHERE ncis_stories.series_id = ANY (SELECT ncis_series_cats.series_id FROM ncis_series_cats WHERE ncis_series_cats.cat_id = '00012') ORDER BY ncis_chapters.date DESC LIMIT 10

    I can't understand why it works under NT and it doesn't works under Linux. Does anyone have an idea? Many thanks in advance.

    ETA: My host is running MySql 4.0.27, while I'm running 5.0.22.

    Source: http://community.livejournal.com/php/545108.html

« php and meta tags || regular expressions »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home