title: Execute mysql "create function" statement with PHP
body: <p>I want to run the following <code>mysql</code> create function statement from PHP:</p>
  
  <pre><code>DELIMITER $$
  CREATE FUNCTION `myFunc`(`instring` varchar(4000)) RETURNS int(11)
      NO SQL
      DETERMINISTIC
      SQL SECURITY INVOKER
  BEGIN
      DECLARE position int;
      ....here comes function logic
      RETURN position;
  END$$
  DELIMITER ;
  </code></pre>
  
  <p>But I get this mysql error:</p>
  
  <blockquote>
    <p>check the manual that corresponds to your MySQL server version for the
    right syntax to use near 'DELIMITER'</p>
  </blockquote>
  
  <p>What can I do? Can I execute create statement without DELIMITER keyword?</p>