title: how to call procedure with parameter in php page
body: <p>i have the two table once main table another once audit table for back up process if delete the record only on audit... if the record was deleted from audit means then update status on main table.....
  for example table structure of <strong>main</strong> table</p>
  
  <pre><code>id name status
  ==============
  1 raj    1
  2 arivu  0
  </code></pre>
  
  <p>for example table structure of <strong>audit</strong> table</p>
  
  <pre><code>id name status
  ==============
  1 raj    1
  2 arivu  0
  </code></pre>
  
  <p>here the status 1 is active and 0 is inactive</p>
  
  <p>if i <strong>delete</strong> the record from the <strong>audit</strong> table 
  then output like
  for example table structure of <strong>audit</strong> table</p>
  
  <pre><code>id name status
  ==============
  1 raj    1
  </code></pre>
  
  <p>and
  main table
  for example table structure of audit table</p>
  
  <pre><code>id name status
  ==============
  1 raj    1
  2 arivu  2
  </code></pre>
  
  <p>if delete any record from audit table the record status is 0 or 1 just update it to 2</p>
  
  <p>now i write procedure for solve the problem but i dont know how to call the procedure on php page
  My Procedure is like</p>
  
  <pre><code>    DELIMITER $$
  
      DROP PROCEDURE IF EXISTS `users` $$
      CREATE DEFINER=`root`@`localhost` PROCEDURE `users`(in id int(25))
      BEGIN
  
  delete from person_history where id=id ;
  
  update person set active='2' where id=id ;
  
  
  END $$
  
  DELIMITER ;
  </code></pre>