MySQL Forums
Forum List  »  Stored Procedures

Re: Stored Procedure with a "ORDER BY" parameter
Posted by: Roland Bouman
Date: November 09, 2005 04:20PM

Whooops! I made a very annoying mistake there. Ironic how you try to explain something and run into the same trap. Sorry for the confusion.

The snippet should be like this :

set @stmt_text := concat('select tabletype from audit order by ',sorder);

get it? No parameters, just build the statement text dynamically. (And beware for sql injection)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Stored Procedure with a "ORDER BY" parameter
2723
November 09, 2005 04:20PM


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.