MySQL 5.0
Народ, есть запрос:
INSERT INTO civicrm_custom_option(entity_table, entity_id, label, value, weight, is_active)
(
'civicrm_custom_field', 9, 'Альфа группа',
SELECT count(value)+1 FROM civicrm_custom_option where entity_id=9,
SELECT count(value)+1 FROM civicrm_custom_option where entity_id=9,
1)
При попытке его выполнить вылетает ошибка:
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 ''civicrm_custom_field', 9, 'Альфа группа',
SELECT count(value)+1 FRO' at line 4,
которая (ошибка) не говорит ни о чем