DBTCP driver functions for PHP4
For all the functions if 'link_identifier' isn't specified, the last opened link is assumed.
int dbtcp_connect ( string DSN, string host [ , int port ] )
Connect to the remote host 'host' and select the data source 'DSN'
Returns the link_identifier or FALSE to indicate whether or not the connection succeeded.
string dbtcp_error ( [ int link_identifier ] )
Returns the error message of the selected link.
int dbtcp_sql ( string QUERY [ , int link_identifier ] )
Sends a query to the server that's associated with the specified link identifier.
Returns TRUE (non-zero) or FALSE to indicate whether or not the query succeeded.
int dbtcp_num_fields ( [ int link_identifier )
Returns the number of fields in a result set.
array dbtcp_field_info( int field [, link_identifier] )
Returns an array that contains name,type and length of the given column number.
Type can be:
'N' - numerical
'D' - date format 'YYYY-MM-DD'
'd' - date/time format 'YYYY-MM-DD HH:MM:SS'
'C' - character
array dbtcp_fetch ( [ int link_identifier ] )
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
array dbtcp_fetch_assoc ( [ int link_identifier ] )
Returns an array associative that corresponds to the fetched row, or false if there are no more rows.
dbtcp_close ( [ int link_indetifier ] )
Close the connection that's associated with the specified link identifier.