mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Port numbers is not allowed when specifying the host name, but a specific port number can be specified as insted of the database name.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@46969 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
db0202b8e3
commit
55028f6110
1 changed files with 13 additions and 11 deletions
|
@ -1088,7 +1088,7 @@ password
|
|||
<programlisting role="php">
|
||||
<?php
|
||||
|
||||
fbsql_connect ("localhost:3306");
|
||||
fbsql_connect ("localhost", "_SYSTEM", "");
|
||||
fbsql_select_db ("wisconsin");
|
||||
$result = fbsql_query ("SELECT * FROM onek");
|
||||
$fields = fbsql_num_fields ($result);
|
||||
|
@ -1451,16 +1451,10 @@ echo "$num_rows Rows\n";
|
|||
<para>
|
||||
<function>fbsql_pconnect</function> establishes a connection
|
||||
to a FrontBase server. The following defaults are assumed for
|
||||
missing optional parameters: <parameter>host:port</parameter> =
|
||||
'localhost:3306', <parameter>username</parameter> = name of the
|
||||
user that owns the server process and
|
||||
<parameter>password</parameter> = empty password.
|
||||
missing optional parameters: <parameter>host</parameter> =
|
||||
'localhost', <parameter>username</parameter> = "_SYSTEM"
|
||||
and <parameter>password</parameter> = empty password.
|
||||
</para>
|
||||
<para>
|
||||
The hostname string can also include a port
|
||||
number. eg. "hostname:port" or a path to a socket
|
||||
eg. ":/path/to/socket" for the localhost.
|
||||
</para>
|
||||
<para>
|
||||
<function>fbsql_pconnect</function> acts very much like
|
||||
<function>fbsql_connect</function> with two major differences.
|
||||
|
@ -1659,6 +1653,14 @@ $result = fbsql_query ("SELECT my_col FROM my_tbl")
|
|||
establish a link as if <function>fbsql_connect</function> was
|
||||
called, and use it.
|
||||
</para>
|
||||
<para>
|
||||
The client contacts FBExec to obtain the port number to use for
|
||||
the connection to the database. if the database name is a number
|
||||
the system will use that as a port number and it will not ask
|
||||
FBExec for the port number.
|
||||
The FrontBase server can be stared as
|
||||
FRontBase -FBExec=No -port=<port number> <database name>.
|
||||
</para>
|
||||
<para>
|
||||
Every subsequent call to <function>fbsql_query</function> will be
|
||||
made on the active database.
|
||||
|
@ -1695,7 +1697,7 @@ $result = fbsql_query ("SELECT my_col FROM my_tbl")
|
|||
<title><function>fbsql_tablename</function> example</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
fbsql_connect ("localhost:3306");
|
||||
fbsql_connect ("localhost", "_SYSTEM", "");
|
||||
$result = fbsql_list_tables ("wisconsin");
|
||||
$i = 0;
|
||||
while ($i < fbsql_num_rows ($result)) {
|
||||
|
|
Loading…
Reference in a new issue