somehow, the only sql i see in debug mode is DESCRIBE `users`
On Dec 16, 4:28 am, grigri <[email protected]> wrote:
> What SQL is being executed?
>
> On Dec 16, 5:26 am, mike <[email protected]> wrote:
>
>
>
> > somehow, its getting to 'test2' in the controller, however, I don't
> > see thedatain the table! I actually had this working in cake1.1 but
> > updated to 1.2 changed htmlhelper to formhelper, and now it doesn't
> > work! any help appreciated.
>
> > Thanks.
>
> >database:
> > CREATE TABLE users
> > (
> > id intNOTNULL AUTO_INCREMENT,
> > /* ... some other fields here */
> > about_me varchar(255),
> > PRIMARY KEY (id)
> > );
>
> > model:
> > class User extendsAppModel
> > {
> > var $name = 'User';
>
> > var $validate = array();
>
> > }
>
> > view:
>
> > <? echo $form->create('User', array('action' => '/add')); ?>
>
> > <?php echo $form->textarea('User/about_me')?>
>
> > <?php echo $form->submit('Add'); ?>
>
> > <? //echo $form->end('Add User'); ?>
> > </form>
>
> > controller:
> > ...
> > function add() {
> > $this->log('in newuser_controller add()');
> > $this->User->create();
> > if(!empty($this->data)) {
> > $this->log($this->data);
> > $this->log('test1');
> > //If the formdatacan be validated and saved...
> > if($this->User->save($this->data)) {
> > $this->log('test2');
> > //Set a session flash message and redirect.
> > $this->Session->setFlash("User Saved!");
> > //$this->redirect('newuser/add');
> > }
> > }
> > }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---