RE: [PHP-DB] SYBASE using STORED PROCEDURES
| From: | Troy Settle | Date: | Mon, 16 Oct 2000 12:14:53 +0000 |
| Subject: | RE: [PHP-DB] SYBASE using STORED PROCEDURES | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3634@lists.php.net to get a copy of this message | ||
$result = sybase_query("sp_helpdb 'mydatabase'",$db);
if (sybase_num_rows($result) > 0) {
while ($tmp = sybase_fetch_result($result)) {
while (list($k,$v) = each($tmp)) {
echo "$k = $v<P>\n";
}
}
} else {
echo "no results";
}
This snippit of code should probably be submitted into the FAQ or Manual
somewhere. It's like one of the most basic ways to retrieve and display
information from any database.
--
Troy Settle
Pulaski Networks
540.994.4254
** -----Original Message-----
** From: Marc Bigler [mailto:N_O_S_P_A_M_syn_uw@hotmail.com]
** Sent: Saturday, October 14, 2000 3:47 AM
** To: php-db@lists.php.net
** Subject: [PHP-DB] SYBASE using STORED PROCEDURES
**
**
** Hello,
**
** I would like to known if it is possible to run a query using a
** stored_procedure and how to do it and how to get the result.
**
** I think it should be used like that:
**
** $queryResult = sybase_query("sp_helpdb mydatabase");
**
** How can i now get the result of this stored procedure, and what if it
** returns 2 record sets ?
**
** Thanks for the help
**
** Regards
**
**
** --
** PHP Database Mailing List (http://www.php.net/)
** To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
** For additional commands, e-mail: php-db-help@lists.php.net
** To contact the list administrators, e-mail:
** php-list-admin@lists.php.net
**
**