PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




odbc_setoption

Name

odbc_setoption — Sets certain ODBC options.

Synopsis

int odbc_setoption(id, function, option, parameter);
resource id: Connection or result ID
int function: Function to use
int option: Option to set
int parameter: Option value

Returns

TRUE on success; FALSE on error

Description

This is a specialist function and should be used with care unless you know your way around ODBC. Unlike other ODBC functions, this works with either the connection ID or the result ID, depending on your situation. In addition, this function can be driver-specific, and some options may not work inside or outside a connection or result. In short, be careful.

The value of the function parameter is set to 1, meaning SQLSetConnectOption() if id is a connection ID, or 2, meaning SQLSetStmtOption() if id is a result ID.

Version

Existing since version 3.0.6

Example

Example 1360. Set autocommit to off

<?php
$db = odbc_connect("DSN","user","pass");
odbc_setoption($db, 1, 102, 1);
?>



PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.