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.

All other Modules /

Discuss all other Modules here.

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

Multiform book example: SQL error on saving related data


Reply


3 Posts   782 Views

Avatar
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

Avatar
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.

Gerard

Avatar
Ingo

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';