MySQL Forums
Forum List  »  Stored Procedures

How to use a tablename as a parameter.
Posted by: Bejay Kim
Date: March 21, 2005 04:59AM

Hi. I'm using MySQL 5.0.2 alpha Stored Procedure function for developing a web application with PHP.

I have some question about using Stored Procedure.

Here is a sample stored procedure what I want to use.

ex)
create procedure test(IN inputTable varchar(255), IN inputWhere varchar(255), IN startLimit int, IN endLimit int)

BEGIN

SELECT * from inputTable inputWhere limit startLimit, endLimit;

END;



1. Can I use a tablename as a parameter of stored procedure ?

2. I want to make a where clause with a string variables like "Set inputWhere = “where User = ‘root’”;". Is this possible ?

Actually there are too few informations about MySQL stored procedure.
Any advice or information would be very appreciated.

Regards,
Bejay Kim

Options: ReplyQuote


Subject
Views
Written By
Posted
How to use a tablename as a parameter.
3772
March 21, 2005 04:59AM


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.