Re: Accessing MySQL default values

2008-09-17 Thread grigri
It's easy to get the default values. Setting them would be harder (especially since cake caches the model schema, so you'd have to kill that once you changed it as well). To get the default values, just use `Model::schema()` : $fields = $this->Model->schema(); echo ''; foreach ($fields as $key =

Accessing MySQL default values

2008-09-16 Thread John Jackson
Is it possible to get and set default values for MySQL columns in CakePHP? I am wondering if it would be a good idea to use MySQL default values to set the default configurations for table data. For example, I have column quota in table users. Instead of storing the default quota limit in a separ