title: how can i pass input parameter with single quote in Stored Procedure
body: <p>i have a stored procedure r, i'm passing the below string but it's not working??</p>
  
  <pre><code>call Prc_SearchKeyword('randomize', "'girl', 'playing'",2,0,31);
  </code></pre>
  
  <p>the below syntax is working fine..</p>
  
  <pre><code>call Prc_SearchKeyword('randomize', 'girl',1,0,31);
  
  
  
  DELIMITER $$
  
  CREATE PROCEDURE `Prc_SearchKeyword`(IN filter VARCHAR(50), IN midquery varchar(200), IN keywordcount int(10), In firstimage int(10), in lastimage int(10) )
  BEGIN
  IF(filter = 'nbofviews') Then
  SELECT sd.imageid, sd.imgcollection, sd.Caption FROM   (SELECT p.imageid  FROM searchinitial_views p join searchkwdmgmt s on p.primarykeyword = s.primary_kwd and s.allkwd in (midquery) GROUP  BY p.imageid HAVING Count(distinct p.primarykeyword) = keywordcount order by views desc  LIMIT  firstimage, lastimage ) q join searchdetails sd ON sd.imageid = q.imageid ;
  END IF;
  IF(filter = 'shootdate') Then
  SELECT sd.imageid, sd.imgcollection, sd.Caption FROM   (SELECT p.imageid  FROM searchinitial_shootdate p join searchkwdmgmt s on p.primarykeyword = s.primary_kwd and s.allkwd in (midquery) GROUP  BY p.imageid HAVING Count(distinct p.primarykeyword) = keywordcount order by shootdate desc  LIMIT  firstimage, lastimage ) q join searchdetails sd ON sd.imageid = q.imageid ;
  END IF;
  IF(filter = 'randomize') Then
  SELECT sd.imageid, sd.imgcollection, sd.Caption FROM   (SELECT p.imageid  FROM searchinitial_random p join searchkwdmgmt s on p.primarykeyword = s.primary_kwd and s.allkwd in (midquery) GROUP  BY p.imageid HAVING Count(distinct p.primarykeyword) = keywordcount order by random desc  LIMIT  firstimage, lastimage ) q join searchdetails sd ON sd.imageid = q.imageid;
  END IF;
  IF(filter = 'priority') Then
  SELECT sd.imageid, sd.imgcollection, sd.Caption FROM   (SELECT p.imageid  FROM searchinitial_priority p join searchkwdmgmt s on p.primarykeyword = s.primary_kwd and s.allkwd in (midquery) GROUP  BY p.imageid HAVING Count(distinct p.primarykeyword) = keywordcount order by priority desc  LIMIT  firstimage, lastimage ) q join searchdetails sd ON sd.imageid = q.imageid ;
  END IF;
  END
  </code></pre>