You are here: communicating with mysql5 stored procedures « PHP Programming Language « IT news, forums, messages
communicating with mysql5 stored procedures

Posted by cieletmer on 11/07/13 11:31

Greetings!

Does anyone have examples on how to interact with mysql5 stored
procedures from php?

I have a stored procedure sp_get_values() with last line

SELECT v_computed_value1 AS cv1, v_computed_value2 AS CV2 ;

When I try to call this from php with the lines:

$sql = "CALL sp_get_values()" ;
$query_result = mysql_query($sql, $connection) ;

the return value of mysql_query is FALSE and I can't do anything with
the mysql_fetch_* functions.

The SQL-Statement

CALL sp_get_values()

works fine with mysql directly and returns the expected 1 row with 2
columns cv1 and cv2.

While we're on the topic, examples of accessing mysql's OUT parameters
from PHP would also be great.

Many thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация