On Thu, Apr 30, 2009 at 2:37 PM, Daniel Convissor
<dani...@analysisandsolutions.com> wrote:

>> $whereClause = '`District`.`id` = "' .
>> $this->mrClean->sql($this->passedArgs[0]) . '"';
>> $this->set('district', $this->District->find($whereClause));

> 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
> District.id column of the table.

You owe me a beer:)

I've checked all of that. What's even more strange is that I found out
that for 3 of the 20 records the view will actually work. The others,
no luck. I have tried all sorts of options on this and simply cannot
discover why the view fails in most cases. I even tried this:

$this->District->findById(35); //which works
$this->District->findById(141); //which fails

However, if I do this:

$this->District->query("select * from districts as District where id='35'");

or:

$this->District->query("select * from districts as District where id='141'");

Both of those work, but it gives me the data in an array that doesn't
work with the data structure that has been set up.

-- 
Randal Rust
R.Squared Communications
www.r2communications.com
614-370-0036
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php

Reply via email to