cmple wrote
>
>
> ralphschindler wrote
>>
>> Based off of what is in master, I can confirm that this works:
>>
>> https://github.com/ralphschindler/Zend_Db-Examples/blob/master/example-15.php
>>
>> What is the error/exception you are getting?
>>
>> -ralph
>>
>> On 5/13/12 9:51 PM, cmple wrote:
>>> Hi,
>>>
>>> It seems like the LIKE expression cannot accept the '%' symbol when
>>> using
>>> mysqli,
>>> it just breaks the query:
>>>
>>> this works:
>>> LIKE 'cm'
>>>
>>> this doesn't:
>>> LIKE 'cm%'
>>>
>>> Is there a work around for this?
>>>
>>> Thanks!
>>>
>>> --
>>> View this message in context:
>>> http://zend-framework-community.634137.n4.nabble.com/ZF2-Db-Sql-Select-WHERE-name-LIKE-cmp-breaks-the-query-tp4631367.html
>>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>>
>>
>>
>> --
>> List: [email protected]
>> Info: http://framework.zend.com/archives
>> Unsubscribe: [email protected]
>>
> instead of ->where->like('artist.name', '%Brit%');
>
> try the following:
> *->where("artist.name = '%Brit%");*
>
> throws exception:
> Zend\Db\Adapter\Exception\InvalidQueryException
> File:
> /***/vendor/ZendFramework/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php:174
> Message:
> Statement couldn't be produced with sql: "SELECT `user`.* FROM `user`
> WHERE "
>
>
> Also, the join statement doesn't work when there is no space in between
> two tables:
>
> this works:
> ->join('album', '*artist.id = album.artist_id*', array('title',
> 'release_date'))
>
> this doesn't:
> ->join('album', '*artist.id=album.artist_id*', array('title',
> 'release_date'))
>
Edit:
*->where("artist.name LIKE '%Brit%");*
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-Db-Sql-Select-WHERE-name-LIKE-cmp-breaks-the-query-tp4631367p4634875.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]