create custom pagination from 2 independent models

2010-04-12 Thread andrei.b
Hello, I want to paginate the search on 2 independent models(news and articles). For example: I want to search for a word foo in both news and articles tables and I want to return the result from news and articles table ordered by add date on the same screen. It is posible? Can someone give me

scaffold isn't working

2010-01-26 Thread andrei.b
Hello, I have 2 tables: authors(id, name, email) and books(id, title, author_id). I've created models for authors and books: class Author extends AppModel { var $name = 'Author'; var $hasMany = 'Book'; } class Book extends AppModel { var $name = 'Book'; var $belongsTo = 'Author';

Re: scaffold isn't working

2010-01-26 Thread andrei.b
as this clears the model cache. You can find the setting, which looks like this: Configure::write('debug', 2); ...in app/config/core.php Jeremy Burns On 26 Jan 2010, at 14:47, andrei.b wrote: Hello, I have 2 tables: authors(id, name, email) and books(id, title, author_id). I've created

Re: scaffold isn't working

2010-01-26 Thread andrei.b
I found the error. The name of the controllers was at the plural instead of singular. On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote: I did that. The select looks like this: SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`, `Book`.`description`, `Book`.`author_id` FROM `books

form-input keeps value after submit is presed

2009-12-06 Thread andrei.b
hello, I have a comment view for a blog witch looks like this: div class=comments form ?php echo $form-create('Comment');? fieldset legend?php __('Add Comment');?/legend ?php echo $form-input('name', array('value' = '')); echo