[TYPO3-mvc] Search by using logicalAnd(constraint1, constraint2)

Dimanche eat.dimanche at yjj.com
Fri Dec 4 06:06:29 CET 2009


Hi,

*** I am getting the problem with searching multi fields by using 
logicalAnd(..., ...) of extbase function.

*** I have created this function:

public function searchResult($request) {
	$query = $this->createQuery();
	$query->logicalAnd($query->equals('user_type',$request['user_type']),$query->equals('district',$request['district']));

	return $results;
}

*** but I still got the error message:	

PHP Catchable Fatal Error: Object of class 
Tx_Extbase_Persistence_QOM_LogicalAnd could not be converted to string 
in 
C:\dev\shp\typo3\sysext\fluid\Classes\Core\ViewHelper\AbstractViewHelper.php 
line 294

*** I don't know I am giving the right arguments of this function or not.

The question is that:

How can I use logicalAnd() function work properly?

Looking forward to getting your answer.


Thanks in advance,
Dimanche


More information about the TYPO3-project-typo3v4mvc mailing list