PHP: maxdb_kill - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

maxdb_master_query maxdb_insert_id

Last updated: Sat, 27 Jan 2007

view this page in

# maxdb_kill

(PECL)

maxdb_kill

(no version information, might be only in CVS)

maxdb->kill -- Disconnects from a MaxDB server

## Description

Procedural style:

bool maxdb_kill ( resource link, int processid )

Object oriented style (method)

class maxdb {
bool kill ( int processid )
}

This function is used to disconnect from a MaxDB server specified by the `processid` parameter.

## Возвращаемые значения

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

## Смотрите также

maxdb_thread_id()

## Example

Пример 1. Object oriented style

`<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* determine our thread id */
$thread_id = $maxdb->thread_id;
/* Kill connection */
$maxdb->kill($thread_id);
/* This should produce an error */
if (!$maxdb->query("CREATE TABLE myCity LIKE City")) {
printf("Error: %s\n", $maxdb->error);
exit;
}
/* close connection */
$maxdb->close();
?>`

Пример 2. Procedural style

`<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* determine our thread id */
$thread_id = maxdb_thread_id($link);
/* Kill connection */
maxdb_kill($link, $thread_id);
/* This should produce an error */
if (!maxdb_query($link, "CREATE TABLE myCity LIKE City")) {
printf("Error: %s\n", maxdb_error($link));
exit;
}
/* close connection */
maxdb_close($link);
?>`

The above examples would produce the following output:

    Error: Session not connected

add a note User Contributed Notes
maxdb_kill
There are no user contributed notes for this page.
maxdb_master_query maxdb_insert_id

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST