Okay, fixed… sort of.
I’ve worked out what the problem is. I run MySQL 5.0.21 on my localhost for development and my web sites server runs MySQL 3.23.58. Until now this hasn’t been a problem. But when uploading my new and improved SQL statements to my web site it goes boom!
I think it’s a compatability issue. The older version doesn’t seem to like the fact that I’m creating a seperate query and returning it as a column. This is annoying. If anyone knows of a way to reproduce the output of
Code:
SELECT distinct a.articleid, a.articleauthorid, a.articletitle, a.articlecontent, a.articledate, a.articleenclosuretitle, a.articleenclosureuri, a.articleenclosurelength, u.userid, u.username, u.userstatus, (SELECT COUNT(*) FROM comments WHERE comments.articleid = a.articleid) AS articlecomments FROM comments c, articles a, users u WHERE a.articleauthorid = u.userid to be compatable with older verions of MySQL please, please, please, please(enough?) tell me!!
Other than that, everything is good. The BBQ last night was fantastic, BBQ steak tastes so good. Anyway, must dash, me and Claire are off to a BBQ (again, woohoo) for our friends Steven and Lauren’s birthdays. Happy Birthday guys!!