<HTML ><HEAD ><TITLE >Sybase functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Function Reference" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="wordwrap" HREF="function.wordwrap.html"><LINK REL="NEXT" TITLE="sybase_affected_rows" HREF="function.sybase-affected-rows.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.wordwrap.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.sybase-affected-rows.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.sybase" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >C. Sybase functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN92054" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.intro" ></A >Introduction</H1 ><P > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.requirements" ></A >Requirements</H1 ><P > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.installation" ></A >Installation</H1 ><P > To enable Sybase-DB support configure PHP <TT CLASS="option" >--with-sybase[=DIR]</TT >. DIR is the Sybase home directory, defaults to <TT CLASS="filename" >/home/sybase</TT >. To enable Sybase-CT support configure PHP <TT CLASS="option" >--with-sybase-ct[=DIR]</TT >. DIR is the Sybase home directory, defaults to <TT CLASS="filename" >/home/sybase</TT >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.configuration" ></A >Runtime Configuration</H1 ><P > The behaviour of these functions is affected by settings in <TT CLASS="filename" >php.ini</TT >. </P ><P > <DIV CLASS="table" ><A NAME="AEN92073" ></A ><P ><B >Table 1. Sybase configuration options</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Name</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Default</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Changeable</TH ></TR ></THEAD ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.allow_persistent</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"On"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.max_persistent</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"-1"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.max_links</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"-1"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.interface_file </TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"/usr/sybase/interfaces"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.min_error_severity</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"10"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.min_message_severity</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"10"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybase.compatability_mode</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"Off"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >magic_quotes_sybase</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"Off"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ></TBODY ></TABLE ></DIV > </P ><P > Here is a short explanation of the configuration directives. <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><A NAME="ini.sybase.allow-persistent" ></A ><TT CLASS="parameter" ><I >sybase.allow_persistent</I ></TT > <A HREF="language.types.boolean.html" ><B CLASS="type" >boolean</B ></A ></DT ><DD ><P > Whether to allow persistent Sybase connections. </P ></DD ><DT ><A NAME="ini.sybase.max-persistent" ></A ><TT CLASS="parameter" ><I >sybase.max_persistent</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > The maximum number of persistent Sybase connections per process. -1 means no limit. </P ></DD ><DT ><A NAME="ini.sybase.max-links" ></A ><TT CLASS="parameter" ><I >sybase.max_links</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > The maximum number of Sybase connections per process, including persistent connections. -1 means no limit. </P ></DD ><DT ><A NAME="ini.sybase.min-error-severity" ></A ><TT CLASS="parameter" ><I >sybase.min_error_severity</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > Minimum error severity to display. </P ></DD ><DT ><A NAME="ini.sybase.min-message-severity" ></A ><TT CLASS="parameter" ><I >sybase.min_message_severity</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > Minimum message severity to display. </P ></DD ><DT ><A NAME="ini.sybase.compatability-mode" ></A ><TT CLASS="parameter" ><I >sybase.compatability_mode</I ></TT > <A HREF="language.types.boolean.html" ><B CLASS="type" >boolean</B ></A ></DT ><DD ><P > Compatability mode with old versions of PHP 3.0. If on, this will cause PHP to automatically assign types to results according to their Sybase type, instead of treating them all as strings. This compatability mode will probably not stay around forever, so try applying whatever necessary changes to your code, and turn it off. </P ></DD ><DT ><A NAME="ini.magic-quotes-sybase" ></A ><TT CLASS="parameter" ><I >magic_quotes_sybase</I ></TT > <A HREF="language.types.boolean.html" ><B CLASS="type" >boolean</B ></A ></DT ><DD ><P > If <TT CLASS="parameter" ><I >magic_quotes_sybase</I ></TT > is on, a single-quote is escaped with a single-quote instead of a backslash if <A HREF="ref.info.html#ini.magic-quotes-gpc" >magic_quotes_gpc</A > or <A HREF="ref.info.html#ini.magic-quotes-runtime" >magic_quotes_runtime</A > are enabled. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > Note that when <TT CLASS="parameter" ><I >magic_quotes_sybase</I ></TT > is ON it completely overrides <TT CLASS="parameter" ><I >magic_quotes_gpc </I ></TT >. In this case even when <TT CLASS="parameter" ><I >magic_quotes_gpc</I ></TT > is enabled neither double quotes, backslashes or NUL's will be escaped. </P ></BLOCKQUOTE ></DIV ></DD ></DL ></DIV > </P ><P > <DIV CLASS="table" ><A NAME="AEN92167" ></A ><P ><B >Table 2. Sybase-CT configuration options</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Name</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Default</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Changeable</TH ></TR ></THEAD ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.allow_persistent</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"On"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.max_persistent</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"-1"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.max_links</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"-1"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_SYSTEM</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.min_server_severity</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"10"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.min_client_severity</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >"10"</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >sybct.hostname</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >NULL</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >PHP_INI_ALL</TD ></TR ></TBODY ></TABLE ></DIV > </P ><P > Here is a short explanation of the configuration directives. <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><A NAME="ini.sybct.allow-persistent" ></A ><TT CLASS="parameter" ><I >sybct.allow_persistent</I ></TT > <A HREF="language.types.boolean.html" ><B CLASS="type" >boolean</B ></A ></DT ><DD ><P > Whether to allow persistent Sybase-CT connections. The default is on. </P ></DD ><DT ><A NAME="ini.sybct.max-persistent" ></A ><TT CLASS="parameter" ><I >sybct.max_persistent</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > The maximum number of persistent Sybase-CT connections per process. The default is -1 meaning unlimited. </P ></DD ><DT ><A NAME="ini.sybct.max-links" ></A ><TT CLASS="parameter" ><I >sybct.max_links</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > The maximum number of Sybase-CT connections per process, including persistent connections. The default is -1 meaning unlimited. </P ></DD ><DT ><A NAME="ini.sybct.min-server-severity" ></A ><TT CLASS="parameter" ><I >sybct.min_server_severity</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > Server messages with severity greater than or equal to sybct.min_server_severity will be reported as warnings. This value can also be set from a script by calling <A HREF="function.sybase-min-server-severity.html" ><B CLASS="function" >sybase_min_server_severity()</B ></A >. The default is 10 which reports errors of information severity or greater. </P ></DD ><DT ><A NAME="ini.sybct.min-client-severity" ></A ><TT CLASS="parameter" ><I >sybct.min_client_severity</I ></TT > <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></DT ><DD ><P > Client library messages with severity greater than or equal to sybct.min_client_severity will be reported as warnings. This value can also be set from a script by calling <A HREF="function.sybase-min-client-severity.html" ><B CLASS="function" >sybase_min_client_severity()</B ></A >. The default is 10 which effectively disables reporting. </P ></DD ><DT ><A NAME="ini.sybct.hostname" ></A ><TT CLASS="parameter" ><I >sybct.hostname</I ></TT > <A HREF="language.types.string.html" ><B CLASS="type" >string</B ></A ></DT ><DD ><P > The name of the host you claim to be connecting from, for display by sp_who. The default is none. </P ></DD ></DL ></DIV > </P ><P > For further details and definition of the PHP_INI_* constants see <A HREF="function.ini-set.html" ><B CLASS="function" >ini_set()</B ></A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.resources" ></A >Resource Types</H1 ><P > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="sybase.constants" ></A >Predefined Constants</H1 ><P >This extension has no constants defined.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="function.sybase-affected-rows.html" >sybase_affected_rows</A > -- get number of affected rows in last query</DT ><DT ><A HREF="function.sybase-close.html" >sybase_close</A > -- close Sybase connection</DT ><DT ><A HREF="function.sybase-connect.html" >sybase_connect</A > -- open Sybase server connection</DT ><DT ><A HREF="function.sybase-data-seek.html" >sybase_data_seek</A > -- move internal row pointer</DT ><DT ><A HREF="function.sybase-fetch-array.html" >sybase_fetch_array</A > -- fetch row as array</DT ><DT ><A HREF="function.sybase-fetch-field.html" >sybase_fetch_field</A > -- get field information</DT ><DT ><A HREF="function.sybase-fetch-object.html" >sybase_fetch_object</A > -- fetch row as object</DT ><DT ><A HREF="function.sybase-fetch-row.html" >sybase_fetch_row</A > -- get row as enumerated array</DT ><DT ><A HREF="function.sybase-field-seek.html" >sybase_field_seek</A > -- set field offset</DT ><DT ><A HREF="function.sybase-free-result.html" >sybase_free_result</A > -- free result memory</DT ><DT ><A HREF="function.sybase-get-last-message.html" >sybase_get_last_message</A > -- Returns the last message from the server</DT ><DT ><A HREF="function.sybase-min-client-severity.html" >sybase_min_client_severity</A > -- Sets minimum client severity</DT ><DT ><A HREF="function.sybase-min-error-severity.html" >sybase_min_error_severity</A > -- Sets minimum error severity</DT ><DT ><A HREF="function.sybase-min-message-severity.html" >sybase_min_message_severity</A > -- Sets minimum message severity</DT ><DT ><A HREF="function.sybase-min-server-severity.html" >sybase_min_server_severity</A > -- Sets minimum server severity</DT ><DT ><A HREF="function.sybase-num-fields.html" >sybase_num_fields</A > -- get number of fields in result</DT ><DT ><A HREF="function.sybase-num-rows.html" >sybase_num_rows</A > -- get number of rows in result</DT ><DT ><A HREF="function.sybase-pconnect.html" >sybase_pconnect</A > -- open persistent Sybase connection</DT ><DT ><A HREF="function.sybase-query.html" >sybase_query</A > -- send Sybase query</DT ><DT ><A HREF="function.sybase-result.html" >sybase_result</A > -- get result data</DT ><DT ><A HREF="function.sybase-select-db.html" >sybase_select_db</A > -- select Sybase database</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.wordwrap.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sybase-affected-rows.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >wordwrap</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >sybase_affected_rows</TD ></TR ></TABLE ></DIV ></BODY ></HTML >