Re: [PHP-DB] creating mysql functions using php

2008-10-09 Thread Andrew Martin
Hello, Here's the procedural code. Surely it's possible to create a MySQL function through the API? $link = mysql_connect('localhost', 'root', 'pass'); mysql_select_db( 'test' ); $ret = mysql_query( 'DELIMITER $$ DROP FUNCTION IF EXISTS `anti_space`$$ CREATE FUNCTION `anti_space` ( inString

Re: [PHP-DB] creating mysql functions using php

2008-10-09 Thread Andrew Martin
Right, problem's obvious really: There's never any need to use delimiter in an API call, as delimiters aren't used - separate calls are made instead. So the following code works just fine: $link = mysql_connect('localhost', 'root', 'pass'); mysql_select_db( 'test' ); $ret = mysql_query( 'DROP