[dev] Delete command for DB Object not working

2013-06-28 Thread Jignesh Kakka (jkakka)

Hi Team,

I am calling Do method of DBObject and passing this statement

delete from customer_user where login = 'test123'

this returns me 1 in response every time

and when I pass select login from customer_user where login = 'test123'

this also returns me 1 in response.


Is this issue with otrs or is there some caching happening?

Thanks,
Jignesh

___
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev


Re: [dev] Delete command for DB Object not working

2013-06-28 Thread Michiel Beijen
Hi Jignesh,

On Fri, Jun 28, 2013 at 7:11 AM, Jignesh Kakka (jkakka)
jka...@cisco.com wrote:

 I am calling Do method of DBObject and passing this statement

 delete from customer_user where login = 'test123'
 this returns me 1 in response every time

 and when I pass select login from customer_user where login = 'test123'
 this also returns me 1 in response.

 Is this issue with otrs or is there some caching happening?

Well the best way to find out is probably to check what you see in the
database; but I doubt it'd be caching.
Please write your code like this:

return if !$Self-{DBObject}-Do(
SQL  = 'DELETE FROM customer_user WHERE login = ?',
Bind = [ \$Login ],
);

This should just work :D

--
Mike
___
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev