I have problem in django using query statement "like %s%" with
Model.objects.raw(). I guess the problem is on '%' character but i don't
know where is it. Here's my model's code:
def listInRange(self, placeLat, placeLng, typeId, range, placeTag):
tags = ''
if placeTag:
aceTag LIKE
'%%test%%')'
On Wednesday, July 17, 2013 9:47:25 PM UTC+7, larry@gmail.com wrote:
>
> On Wed, Jul 17, 2013 at 8:24 AM, spondbob squelpen
> >
> wrote:
> > I have problem in django using query statement "like %s%" with
> > M
July 17, 2013 10:04:48 PM UTC+7, larry@gmail.com wrote:
>
> On Wed, Jul 17, 2013 at 8:58 AM, spondbob squelpen
> >
> wrote:
> > where do i put those double percentage? like this?
> > tags = " AND (placeTag LIKE '%%" + "%%' OR placeTag
sorry i'm new with django, could u please tell me how to use the debugger?
On Wednesday, July 17, 2013 10:17:10 PM UTC+7, larry@gmail.com wrote:
>
> On Wed, Jul 17, 2013 at 9:15 AM, spondbob squelpen
> >
> wrote:
> > the '1' is coming from typeId, so t
I've tried the debugger but i have no idea how to use it to find my
problem. in Pdb console i've tried check any variable value and everything
seems fine
On Wednesday, July 17, 2013 10:34:39 PM UTC+7, larry@gmail.com wrote:
>
> On Wed, Jul 17, 2013 at 9:28 AM, s
that error?
WHERE (placeTag LIKE '%test%') AND placeType_id='1' GROUP BY p.placeId
HAVING placeDistance
On Thursday, July 18, 2013 4:09:36 AM UTC+7, spondbob squelpen wrote:
>
> I've tried the debugger but i have no idea how to use it to find my
> problem. in Pdb conso
I tried to make it simple like this:
placeTag = "'\%"+placeTag+"\%'"
...
query = r""" ... WHERE placeType_id = %s AND placeTag LIKE %s ... """
The query string is correct:
WHERE placeType_id = 1 AND placeTag like '\%tes\%'
But i got no result in django. When i execute it in mysql client i got
re
7 matches
Mail list logo