Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Executing queries

I have the following piece of code:

Don't be scared to open, it is very short :)

But this part of code is not doing well. If i enter Azebaijan, New york , it returns true... What am i doing wrong?


You have to return just one record from the query to expect a ┬┤false┬┤when it isn't returning a single record.


Solved it this way :

  1. $countrycitytest = LocationTest::findFirst(array(
  2. "conditions" => "cc_fips = '$enteredcountry' AND full_name_nd = '$enteredlocation'"
  3. ));