Hello,
I have big Problem. I build a Database driven WebSite but tested and developed my Code with MySQL 4.0.x. But on my Server i have MySQL 3.23.49 because it is last stable release for Debian. My support told me that, i hope that it is true.
And i think some SQL features from 4.0.x are not included in the 3.23.49version. I think Subquerys and Joins (just a guess, please correct me) aren't support. But i have no idee how to write the SQL query without that.
Could somebody help me?
I post the Query in SQL, the Error Message and the tables.
SQL Statement:
SELECT Ausstellung.titel,Ausstellung.gbeschreib,Kuenstler .bezeichnung,concat(date_format(start,'%d.%m'),' - ',date_format(ende,'%d.%m.%y')) as datum, Ausstellung.start, Kuenstler.KID, Kuenstler.Name Name, Kuenstler.Vorname Vorname, erarbeitet.AID AID FROM Kuenstler RIGHT JOIN (Ausstellung LEFT JOIN erarbeitet ON Ausstellung.AID = erarbeitet.AID) ON Kuenstler.KID = erarbeitet.KID WHERE (date_format(Ausstellung.start,'%y')= '01') order by Ausstellung.AID
ERROR:
You have an error in your SQL syntax near '(Ausstellung LEFT JOIN erarbeitet ON Ausstellung.AID = erarbeitet.AID) ON Kuenst' at line 1
Tables:
CREATE TABLE `kuenstler` (
`KID` bigint(20) NOT NULL auto_increment,
`Name` varchar(255) default NULL,
`Vorname` varchar(255) default NULL,
`bezeichnung` text NOT NULL,
PRIMARY KEY (`KID`,`KID`)
) TYPE=MyISAM AUTO_INCREMENT=28 ;
_______
CREATE TABLE `ausstellung` (
`AID` int(11) NOT NULL auto_increment,
`Start` date default NULL,
`Ende` date default NULL,
`gBeschreib` varchar(255) default NULL,
`Titel` varchar(255) default NULL,
`Bild1` varchar(255) default NULL,
`Bild2` varchar(255) default NULL,
`Bild3` varchar(255) default NULL,
`Bild4` varchar(255) default NULL,
PRIMARY KEY (`AID`)
) TYPE=MyISAM AUTO_INCREMENT=21 ;
_______
CREATE TABLE `kuenstler` (
`KID` bigint(20) NOT NULL auto_increment,
`Name` varchar(255) default NULL,
`Vorname` varchar(255) default NULL,
`bezeichnung` text NOT NULL,
PRIMARY KEY (`KID`,`KID`)
) TYPE=MyISAM AUTO_INCREMENT=28 ;
Please if u think that it isn't possible to do the same Statement in MySQL 3.23.49, teel me this.
Thank u that u read it and if u have any comments or solutions, please tell me these.
Regards
Fabio