On 6 February 2013 11:03, Alexander Farber <alexander.farber@gmail.com>wrote:
> begin
>
> insert into pref_ban2 select
> id,
> first_name,
> last_name,
> city,
> last_ip
> from pref_users where id=_id;
>
> update pref_ban2 set reason=_reason where id=_id;
>
It's not the answer to your query, but why don't you do the above in a
single statement?
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.