Re: can anyone help me on find()

2006-10-23 Thread nate

And/or:
$found_username = $this->Username->find(am($this->postConditions(),
array('language_id' => $lang));

-or-

$found_username =
$this->Username->findByNameAndLanguageId($this->data['User']['name'],
$lang));
(PHP 5)

-or-

$found_username =
$this->Username->findByName_and_language_id($this->data['User']['name'],
$lang));
(PHP 4 & 5, but less elegant)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: can anyone help me on find()

2006-10-23 Thread Grant Cox

And for the conditions, you can pass an associative array when all you
want is equality.

$found_username = $this->Username->find(
array('name'=>$this->data['Username']['name'], 'language_id' => $lang)
);


On Oct 24, 1:03 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> $this->Username  Models are CamelCaseSingular
>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: can anyone help me on find()

2006-10-23 Thread Samuel DeVore

$this->Username  Models are CamelCaseSingular

On 10/23/06, Gayathiri <[EMAIL PROTECTED]> wrote:
>
> Hi, i need to extract a record whose name is from input field and
> language_id id $lang value. I have the following code. But it isnt
> working..can anyone help on this please.
>
> $id=$this->username->find("name = " . $this->data['Username']['name'] .
> "AND language_id = " . $lang);
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---