mysql存储函数不能用于预处理语句(php)

I'm trying to create a sequence replacement in innoDB (since auto_increment behaves differently than in myisam). So i've created a stored function, named seq. I can use it as follows:

INSERT INTO a_table(id) VALUES(seq('seq_a_table'));

My mysqli based database library automatically uses prepared statements, so i get this error:

This command is not supported in the prepared statement protocol yet 

MySQL version: 5.1.48 (OSX snow leopard).

UPDATE

Wow, i feel stupid... i was so confused by the error that i missed the simple fact that it wasn't thrown by the statement in question. I was using transactions and forgot that my query function automatically compiles everything as statements, including "START TRANSACTION". So for future late night coders - do not try to start a transaction in a statement :)

why not just use the old mysql for that case. something like:

$con = mysql_connect("192.168.x.x","host","pass");
if (!$con) die('Could not connect: ' . mysql_error());
mysql_select_db("yourdb", $con) or die("cannot select DB");

mysql_query( "INSERT INTO a_table(id) VALUES(seq('seq_a_table'))" );