Hi my first issue for CCK, I don't think it's duplicate... I've had this problem with computed_field and with a field I'm creating.
When I set a default value, it isn't getting quote marks around it, and the sql is failing.
In hook_field_widget, I set:
'#default_value' => isset($node_field) ? $node_field[0]['some_id'] : 'blah',
Then the error:
* user warning: 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 'xyz' at line 1 query:
ALTER TABLE content_type_edtest ADD COLUMN field_eyedrop_params varchar(255) NOT NULL default xyz;
in /var/www/includes/database.mysql.inc on line 172.
Should I be adding the quotes in my code?
Comments
Comment #1
simeI've manually added quotes assuming this is correct.