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

Posted by "Colin Shreffler" on 10/24/05 23:48

After further investigation I found that using the 'mysqli' object and
corresponding extension library will allow you to execute MySQL stored
procedures from PHP.

documentation can be found at:

http://www.php.net/manual/en/ref.mysqli.php

cheers
-c

> 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
>
>
>
>


Thank you,
Colin Shreffler
Principal
303.349.9010 - cell
928.396.1099 - fax
colin.shreffler@warp9software.com

Warp 9 Software, LLC.
6791 Halifax Avenue
Castle Rock, CO 80104

Confidentiality Notice: The information in this e-mail may be confidential
and/or privileged. This e-mail is intended to be reviewed by only the
individual or organization named in the e-mail address. If you are not the
intended recipient, you are hereby notified that any review, dissemination
or copying of this e-mail and attachments, if any, or the information
contained herein, is strictly prohibited.

 

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

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