Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Multiform book example: SQL error on saving related data

Go to End

3 Posts   1088 Views

Gerard Mengerink

Community Member, 3 Posts

22 November 2010 at 3:14am

I'm getting following error on saving Skills in the book example of chapter 6.

Couldn't run query: SELECT "Skill"."ClassName", "Skill"."Created", "Skill"."LastEdited", "Skill"."Title", "Skill"."ID", CASE WHEN "Skill"."ClassName" IS NOT NULL THEN "Skill"."ClassName" ELSE 'Skill' END AS "RecordClassName" FROM "Skill" WHERE (`Skill`.`Title` = "HTML") LIMIT 1 Unknown column 'HTML' in 'where clause'
Line 526 of MySQLDatabase.php

If I copy this in SQLYog and execute, it says the same. After changing double quotes into single qoutes (" in to ') it works all right.


Gerard Mengerink

Community Member, 3 Posts

22 November 2010 at 3:22am

Problem SOLVED. I used the book code version. Latest version works all right.



Forum Moderator, 801 Posts

16 December 2010 at 10:15pm

Hey Gerard, you have to ensure any SQL connection you're making (including SQLYog) is running in "ANSI" mode (main difference: double quotes rather than backticks). You can do this on a query by query level as well: SET sql_mode = 'ANSI';