generic Mysql stored procedure

Posted by psu on Stack Overflow See other posts from Stack Overflow or by psu
Published on 2010-04-04T17:58:03Z Indexed on 2010/04/04 18:03 UTC
Read the original article Hit count: 242

Filed under:
|
|
|

Hi,

I have the fallowing stored procedure:

CREATE PROCEDURE `get`(IN tb VARCHAR(50), IN id INTEGER)
BEGIN
    SELECT * FROM tb  WHERE Indx = id;
END//

When I call get(user,1) I get the following:

ERROR 1054 (42S22): Unknown column 'user' in 'field list'

© Stack Overflow or respective owner

Related posts about mysql

Related posts about store