Ok, I think I solved it. The proper value was being passed into the
function after all. The problem was in how I was structuring my find
in the controller function. I had:

$conditions = array();
$conditions['Transaction']['clientID'] = "= {$theclientid}";
$results = $this->Transaction->findAll($conditions);

Which does not work (any ideas why???). However, this does work:

$results = $this->Transaction->findByClientid($theclientid);

Regards,
--Mike

On May 27, 9:53 am, Mike <[EMAIL PROTECTED]> wrote:
> Hi:
> I am using Cake 1.2 and I love it so far! I have a small problem that
> I cannot solve. I have the following in one of my views:
>
> echo $html->link(
>         'View My Current Inventory',
>         
> '/transactions/viewinventoryforclient/'.$session->read('customclientid')
>
>     );
>
> In my controller for the transactions view, I have a function as
> follows:
>
> function viewinventoryforclient($theclientid = null) {
> .....
>
> }
>
> The value being passed does appear in the url:
>
> http://localhost/transactions/viewinventoryforclient/CLIENT1
>
> However, when I test the variable $theclientid appears to have an
> empty value of some kind in the controller function. I am executing a
> find:
>
> $conditions = array();
> $conditions['Transaction']['clientID'] = "= {$theclientid}";
> $results = $this->Transaction->findAll($conditions);
>
> I get a sql error and in the debug display in the where condition of
> the generated sql statement, it's blank after the ". . .where clientID
> = ".
>
> I would really appreciate some help on this. I've gone through docs
> and groups, but to no avail.
>
> Thanks!!
> --Mike

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to