You are here: Re: [PHP] Calling PostgreSQL & MySQL Stored Procedures « PHP « IT news, forums, messages
Re: [PHP] Calling PostgreSQL & MySQL Stored Procedures

Posted by "Richard Lynch" on 10/23/05 04:02

On Sat, October 22, 2005 12:55 pm, Colin Shreffler wrote:
> Can any one please tell me how you call a stored procedure in either
> PostgreSQL or MySQL from php?

WILD GUESS:

$query = "call silly_sproc()";
mysql_query($query, $connection) or die(mysql_error($connection));
pg_exec($connection, $query) or die(pg_last_error($connection));

With an argument is left as an exercise to the reader.

HINT: Stuff whatever you would type in the mysql/psql monitor into $query

No promise this works, as I've only done user-defiend functions rather
than stored procedures (unless those are the same...) in PostgreSQL,
and my webhost's MySQL probably ain't up to stored procedures yet.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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