[nycphp-talk] Help with a CakePHP View

Daniel Convissor danielc at
Thu Apr 30 14:37:08 EDT 2009

On Thu, Apr 30, 2009 at 11:10:16AM -0400, Randal Rust wrote:
> $whereClause = '`District`.`id` = "' .
> $this->mrClean->sql($this->passedArgs[0]) . '"';
> $this->set('district', $this->District->find($whereClause));
> If I remove $whereClause from the second line, the view works. But I
> get the first record from the database. If I leave it in there, I get
> a blank page.

I'll bet you a beer that it's because there's no record in the database 
with a matching record.  So that means either $this->passedArgs[0] isn't 
being set or is set to a value that doesn't equal a value in the column of the table.


 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

More information about the talk mailing list