COil | 4 Oct 2006 15:29
Picon
Favicon
Gravatar

Re: Criteria like and db integer field [RESOLVED]


Yes it 'idcommande' is an integer.

Thanks it works well. :)

$criterion = $c->getNewCriterion(CommandesPeer::IDCOMMANDE,
CommandesPeer::IDCOMMANDE. ' LIKE \'%' .$this->key. '%\'',
Criteria::CUSTOM);

Hans Lellelid wrote:
> 
> Hmm?  Is 'idcommande' an integer column?
> Perhaps you should just use Criteria::CUSTOM for this if you are using
> SQL functions to cast the column type.
> 
> Hans
> 
> COil wrote:
>> Of course... i mean, if i want to do a like search i want my field to be
>> converted as string before obviously :
>>
>> where to_string('idcommande') like '%kikoo%'
>>
>>
>> Hans Lellelid wrote:
>>   
>>> Is that legal SQL...?
>>>
>>>     
>>
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> propel.tigris.org
> For additional commands, e-mail: users-help <at> propel.tigris.org
> 
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Criteria-like-and-db-integer-field-tf1905567.html#a6639545
Sent from the propel - users mailing list archive at Nabble.com.

Gmane