Mark, The servers are two different versions. The one on which the query works supports subqueries and the one on which it doesn't work does not support subqueries.
Best regards, Jim at iDimensionz.com -- http://www.iDimensionz.com Professional web site design and affordable web site hosting. ------------------------------------------------------------------------ Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=38044&t=84> – Get the new open source web browser, FireFox, and enjoy features like pop up blocking, tabbed browsing and MUCH more! Get Thunderbird! <http://www.spreadfirefox.com/?q=affiliates&id=38044&t=178> – Get the new open source e-mail client, ThunderBird, and enjoy features like integrated spam filter, privacy protection, integrated RSS reader and MUCH more! musicarr34 wrote: > Hi, > > I am in the process of learning PHP/MySQL. This is my first post. > Below is a snippet of a query (shortened for example purposes) that > works on my current server, but does not work on the server I am in > the process of moving to. (Scary). Here's the snippet. I don't know if > this is all the information neccessary for someone to give an opinion, > so forgive me for my ignorance. > > --------------------- > SELECT d.destination, i.nights, (SELECT MIN(inside_bro) FROM sailings > WHERE i.itin_id = itin_id GROUP BY itin_id ORDER BY itin_id) AS > min_inside_bro > > FROM itineraries AS i, destinations AS d, ships AS s, cruise_lines AS > cl, sailings > > WHERE i.destination = d.dest_id AND i.cline = cl.cline_id AND i.ship = > s.ship_id > > GROUP BY i.itin_id > > ORDER BY destination, sailing_date, cl_name, ship_name, sailing_port > --------------------- > > Here is the error I get: > "#1064 - 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 MIN(inside_bro) FROM sailings WHERE i.itin_id = itin_id" > > If any one has any idea about what the problem is, please let me know. > Again, I'm now at this. > > Thanks very much, > > Mark ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income homes are not online. Make a difference this holiday season! http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/CefplB/TM --------------------------------------------------------------------~-> The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
