1

I use specific custom SQL functions for chemistry purpose, like a chemistry cartridge for MySQL (mychem).
My users give me a first field (text 'molfile') through a regular form, in a text area and I compute other fields (blob 'obserialized') on the fly when inserting.

My SQL statement looks like :

INSERT INTO `bin_structures` (`id`,`obserialized`)
  VALUES (`mol_id`,  MOLECULE_TO_SERIALIZEDOBMOL(`molfile`));

short for the exemple.
Is there a way (beforeSave callback?) to add 'obserialized' field and MOLECULE_TO_SERIALIZEDOBMOL(molfile) value to the SQL statement or am I on the wrong way with a callback?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.