I created procedure as follows its working fine for the parameter strWhere but its not working whith strTableName.
CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(IN strWhere VARCHAR(50),IN tableName VARCHAR(50))
select * from tableName where first_name=strWhere
The PHP code with which i called it is
<?PHP
$mysqli = new mysqli( "localhost", "root", "", "test1" );
$res = $mysqli->multi_query( "CALL p2('Joey','users');" );
?>
If i pass only column value its working fine i.e p2('Joey')
But with both arguments its not working fine.
Please help me about this.
Is there any other way to pass the name of table in parameter or what?
little help needed
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: little help needed
Is there not a thread for this already?