Re: Calling Stored Procedures from PHP

2006-11-28 Thread Remo Tex
Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx I'm not PHP expert but I've managed to do this in perl using DBI (in spite of all

Re: Calling Stored Procedures from PHP

2006-11-28 Thread Chris White
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;

Re: Calling Stored Procedures from PHP

2006-11-28 Thread Filipe Freitas
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

Re: Calling Stored Procedures from PHP

2006-11-28 Thread dpgirago
You seem to be mimicking the prepared query feature of mysqli in PHP5. Do you have the mysqli extension available? 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

Calling Stored Procedures from PHP

2006-11-27 Thread Filipe Freitas
Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Rolando Edwards
Remove the Semicolon mysql_query(CALL mySP()); Give it a try !!! - Original Message - From: Filipe Freitas [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, November 27, 2006 10:59:09 AM GMT-0500 US/Eastern Subject: Calling Stored Procedures from PHP Hi, This is not a mysql

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Chris White
On Monday 27 November 2006 07:59, Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx No success how? Generally with stored procedures

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Filipe Freitas
Chris White wrote: On Monday 27 November 2006 07:59, Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. thx No success how?

Re: Calling Stored Procedures from PHP

2006-11-27 Thread Mike Kruckenberg
Filipe Freitas wrote: Hi, This is not a mysql thing but maybe you can help me. I want to call a stored procedure from PHP, so I tried it like normal querys: mysql_query(CALL mySP();); with no success. What is happening when you make the call? That might help get some more precise advice. My