NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help with a CakePHP View

Randal Rust randalrust at gmail.com
Fri May 1 09:23:29 EDT 2009


On Fri, May 1, 2009 at 9:14 AM, Nate Abele <nate at cakephp.org> wrote:

> This may or may not fix your problem, but your query syntax is wrong.

Thanks, Nate. Yes, after really digging around, including an attempt
to upgrade, I figured out there was a syntax issue. I was able to get
it working for now, but at least I am aware of yet another potential
issue.

>  Depending on your Cake version:

This app is using version 1.1.19.6305, running PHP5, so I think the
following will work, right?

> $district = $this->District->find(array("District.id" =>$this->passedArgs[0]));

> However, using findById should do effectively the same thing, so why not use that?

Yeah, I tried that and it kept giving me an error. Which is what clued
me in to the idea that the version I was working with was not the same
as what the Cookbook is written for. That was a pretty dumb assumption
on my part, thinking I was working with the current release.

The application runs fine on the current production server, which is
part of the reason the errors were so perplexing. Anyway, I am on to
the next step in the process -- moving to the new test server. We'll
see how that goes.

-- 
Randal Rust
R.Squared Communications
www.r2communications.com
614-370-0036



More information about the talk mailing list