Chris White wrote:
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.
I never really looked into mysqli, so far I only used the mysql
extention in PHP.
So maybe that will help.
thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]