Får inte följande att fungera:
SELECT CONCAT( u.firstName, ' ', u.lastName ) AS Name, p.title, p.date, p.leadTxt, p.bodyTxt, u.profileImage,
(SELECT CASE lastupdate WHEN IS NULL THEN ' ' ELSE CONCAT('Uppdaterad', ' ', lastupdate) END AS 'lastupdate'
FROM edithistory AS eh
WHERE eh.postID = p.postID
ORDER BY lastupdate DESC
LIMIT 1) AS lastupdate
AS lastupdate
FROM post AS p
INNER JOIN user AS u
ON u.userID = p.userID
Får följande felmeddelande:
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 'IS NULL THEN ' ' ELSE CONCAT( 'Uppdaterad' , ' ' , lastupdate ) END AS 'lastupda' at line 1
Hur löser man detta med null??
Tacksam för all hjälp :stud