Catch stored procedure error

2009-07-21 Thread Simz
Hi, i want to know if its possible to catch stored procedure error? i would like to rollback on error... $this-query('call sp_CustomersProduct_addProductsByFamily(?,?)',array (1,1); should i return a value on succes? thank you --~--~-~--~~~---~--~~ You received

Re: Problems with $uses and model relationships

2009-06-23 Thread Simz
Im not sure but try setting the kpi.id to something else than 0 On 23 juin, 10:06, DavidH djhollingwo...@gmail.com wrote: Hi Again I'm really getting stuck with my accessing the related data I need though my controller and into my view. To top it all I seem to have broken my controller by

Re: How to call validation in a form that doesn't use save()?

2009-02-06 Thread Simz
In your model use message inside your validation rules http://book.cakephp.org/view/125/Data-Validation by default a red message will be displayed under the invalid field. you can access the error info from your controller using $errors = $this-ModelName-invalidFields();

Re: Collecting data from array depending on Association

2009-02-06 Thread Simz
in case you don't find the good way ti do it i suggest you to create a custom model method using $this-­query('your custom query') On Feb 6, 7:57 pm, abergs.and...@gmail.com abergs.and...@gmail.com wrote: Hello! Im been at this for hours and hanging in the IRC channel, without getting

Re: Help with linked image swap

2009-02-06 Thread Simz
use the html helper : http://book.cakephp.org/view/206/Inserting-Well-Formatted-elements image(string $path, array $htmlAttributes = array()) in your view (inside a php block) echo $html-image( menu1.jpg, array( onmouseover=­yourJsRollOverFunc(), onclick=jsFunc(),

Re: loading a layout from a database

2009-02-02 Thread Simz
Using elements? On 2 fév, 15:14, Aurelius aurel...@temporaryinbox.com wrote: Hi! Whats the best way to read a layout from the database? Simply writing a model for the layout-table and using following layout- code? ?php echo $database_layout['top']; echo $scripts_for_layout; echo

Re: Call function in controller from model

2009-01-30 Thread Simz
Instead, you should return a status and call the debug functon from controller if ($this-Waitlist-save()) { ... } else { //debug here } btw parrent::errorlog while not call the controller... it will call the model parent... (appmodel or model) On 30 jan, 06:31, Henrik Gemal