Thursday, October 28, 2010

Find all query + conditions

Hello, I have a problem a few days it seems very simple, but
I can not in any way a solution.
I have a table, more or less like this, but has many more fields
summarize because it's just that I need:
id veiculosModelo veiculosHodo(int)
veiculosHodoprox(int)
1 carro1 20 60
2 carro2 30 90
3 carro3 23 1
4 carro4 0 1
5 carro5 0 1
6 carro6 5 24
7 carro7 40 1

I run this query:

$ Rec = $ this-> Vehicle-> find ('all',
array ('conditions' => array (' veiculosHodo> '=>'')));
veiculosHodoprox
$ This-> set ('vehicle', $ rec);

the query result is this:

id veiculosModelo veiculosHodo veiculosHodoprox
1 carro1 20 60
2 carro2 30 90
3 carro3 23 1
6 carro6 5 24
7 carro7 40 1

It should be a primary error that's going on, but I have done all
sorts of
test and nothing, I even made an appointment at the bank with this
select (SELECT *
FROM `` WHERE `vehicles veiculosHodo`> `` veiculosHodoprox) and it
worked
perfectly, if anyone knows please give me a help.

Thanks.
Hug!

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: