As a bew symfony developer I highly recommend you start and complete
the Jobeet tutorial for Doctrine:

http://www.symfony-project.org/jobeet/1_2/Doctrine/en/

This will give you a great example of using everything in symfony you
would ordinarily use. I know it seems like a long way to get going,
but personally I think it would serve you best to spend a few hours
doing something like this now than trying piece-meal to learn symfony.

Also, Another thing I highly recommend is reading The Definitive Guide
to symfony. You don't necessarily need to practice every example they
give, but as long as you read through the book you will later in
development be able to remember that symfony had X feature to help
solve Y problem and can go look it up again. If you don't know that
something exists, you wont even know you can use it :)

http://www.symfony-project.org/book/1_2/

Hope that helps. With those two resources under your belt you will be
a power symfony user in no time at all :)

On Fri, Mar 5, 2010 at 11:04 AM, bertzzie <bertz...@gmail.com> wrote:
> Hi, I'm very new to symfony, and just a novice developer also...
> I searched in forum and documentation already and can't find the
> answer (probably because it's too basic and simple :D)
>
> Here's the case :
>
> I have one table, 'user' to save username and password, then I want to
> retrieve the data from that table and check if the submitted username
> and password is right. I use a loginForm class that I write, and then
> check it from the main module.. here's the code :
>
> loginForm.class.php :
> class LoginForm extends BaseForm
> {
>                public function configure()
>                {
>                        $this->setWidgets(array(
>                          'NIP'      => new sfWidgetFormInputText(),
>                          'password' => new sfWidgetFormInputPassword(),
>                        ));
>
>                        $this->widgetSchema->setNameFormat('login[%s]');
>
>                        $this->setValidators(array(
>                          'NIP'      => new sfValidatorString(array('required' 
> => true)),
>                          'password' => new sfValidatorString(array('required' 
> => true)),
>                        ));
>                }
> }
>
> actions.class.php
>  public function executeIndex(sfWebRequest $request)
>  {
>        $this->form = new LoginForm();
>
>        if($request->isMethod('post'))
>        {
>                $this->form->bind($request->getParameter('login'));
>
>                if($this->form->isValid())
>                {
>                        $formValue = $this->form->getValues();
>
>                        $query = Doctrine_Query::create()
>                          ->select('password')
>                          ->from('pengguna')
>                          ->where('pengguna.NIP = ' . $formValue['NIP'] );
>
>                        $this->user = $query->execute();
>
>                }
>        }
>  }
>
> The code's not finished yet because I don't know how to get the value
> of the query I just executed...
> Things that I want to ask :
> 1. How to get the value (result) of $query->execute() ?
> 2. Are there any step by step tutorial that teaches most of these
> basic things ? (I've read practical symfony and doctrine orm for php,
> but I think it's too advanced for me - so many confusing things)
>
> The main problem of those two books is that they assume you know about
> doctrine ( practical symfony ) and that there's too many things that I
> have to read when what I need is just a simple question.. I need
> something like the PHP API documentation.. so any recommendation ?
>
> Thanks before, and sorry for my bad english..
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to