On Monday 27 November 2006 09:12, Filipe Freitas wrote: > CREATE PROCEDURE `getListaDeNewsflashes`(in quantidade smallint) > COMMENT 'Devolve uma tabela com um nĂºmero limite de newsflashes' > begin > PREPARE statement FROM "SELECT * FROM newsflashes ORDER BY RAND() LIMIT ?"; > SET @limit=quantidade; > EXECUTE statement USING @limit; > end
You seem to be mimicing the prepared query feature of mysqli in PHP5. Do you have the mysqli extension avaliable? If so, you can use things like: http://www.php.net/manual/en/function.mysqli-stmt-bind-param.php which has an example as to how to utilize a prepared query. -- Chris White PHP Programmer Interfuel 805.642.2200 x110 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]