MySQL Forums :: Stored Procedures :: Help with 1064 error

Advanced Search

Re: Help with 1064 error
Posted by: Peter Brawley ()
Date: September 21, 2016 04:21PM

< I am not sure on how to right that correctly.

set @id = (select ifnull( max(id), 1 ) from ao_1991c6_page_view ;
insert into ao_1991c6_page_view ( id, page_id, viewer_id, view_date )
  select @id := @id+1, c.contentid, u.lower_username, now()
  from content      as c
  join user_mapping as u on c.lastmodifier = u.user_key
  where contenttype = "page" and content_status = "current";

Much simpler, much faster, much more efficient use of your time.

> why you change the delimiter.

Most mysql clients require it for parsing of stored routines.

Options: ReplyQuote

Subject Views Written By Posted
Help with 1064 error 2560 Greg Della-Croce 09/21/2016 07:58AM
Re: Help with 1064 error 310 Peter Brawley 09/21/2016 11:06AM
Re: Help with 1064 error 278 Greg Della-Croce 09/21/2016 02:50PM
Re: Help with 1064 error 261 Peter Brawley 09/21/2016 04:21PM
Re: Help with 1064 error 233 Greg Della-Croce 09/21/2016 07:31PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.