Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104912 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88756 invoked from network); 24 Mar 2019 04:49:27 -0000 Received: from unknown (HELO mail-oi1-f169.google.com) (209.85.167.169) by pb1.pair.com with SMTP; 24 Mar 2019 04:49:27 -0000 Received: by mail-oi1-f169.google.com with SMTP id e22so4481201oiy.0 for ; Sat, 23 Mar 2019 18:42:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Rb7mLiyN1p7x6fiuAer+oKURDtjla4MEQehtbS4hTTc=; b=WQuxwFKhV77VE2xd4VqJgzp+gOWqP2qoSUPbwxX3JIOPkYQkj9huF5bzTYxHF9s73Z bdEy62LwiTDgvSxT9KGpZiGU2PDa1QkdOJoelTPVuKjwwajLkNwQVv3XrihYBYYRb2Sp cHDYXuiqmt8yonX0xuZiijtbdTgPO635UOyBXeaRzfJu0B+GAXkSjy062beKWAywMv3M rL6IthTOylVOzxP2rz5wlNEro+feQ2e4W/mROvQAG368QuSLqJ47Sl3zVKDQRAgL8Dwn PXNfizHonu0ITfkoXbS0xsnWkiAUskNXGfBZPVuB1ox0wcnpC3n8Fny8gwS/YZW6l7vJ RFoQ== X-Gm-Message-State: APjAAAWFUot3mUuYhSphUSn7S2bRAPkzxNZPhBW3jJoF/IHOsm1ItR2v UnKJHaaA+gYXcGBhKW902sC10EDsiUP93tymAD0hfc9GkwE= X-Google-Smtp-Source: APXvYqxm5o0J5050nzfRt68aOl8oV1xDvgS9rlsQJbX4d+gizWQHbPv4btC0ms7eH12YYLiq21xR1AMJCpFo91xE+8Q= X-Received: by 2002:aca:c002:: with SMTP id q2mr6656691oif.145.1553391733578; Sat, 23 Mar 2019 18:42:13 -0700 (PDT) MIME-Version: 1.0 References: <33dee569-a06f-c5ab-d358-f7b8df3f8a76@lsces.co.uk> <1166897a-379d-4e6f-d132-744171ea19d5@lsces.co.uk> In-Reply-To: Date: Sun, 24 Mar 2019 03:42:00 +0200 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Unbundle ext/interbase From: kalle@php.net (Kalle Sommer Nielsen) Den s=C3=B8n. 24. mar. 2019 kl. 03.11 skrev Lester Caine : > > (Neely forgot to fix reply address!) > > On 24/03/2019 00:22, Kalle Sommer Nielsen wrote: > > mysql_connect('localhost', 'user', 'password'); > > mysql_select_db('test'); // The last created connection is implicitly a= dded here > > This situation never exists in Firebird or Interbase. The ONLY way to > connect is to a database, you can not connect to the server without > using a database in the connection string. Each database is it's own > file or set of files if spread across multiple disks. There is no way of > asking a server what databases are available, you have to know > beforehand. Although some newcomers call it a bug it's an original > design feature. Really Lester, really. It was a pseudo example, do I really need to be EXPLICIT and spell everything out very specifically for you? ibase_connect('localhost:/path/to/some/db.gdb', 'user', 'password'); ibase_query('UPDATE a_table SET a_column =3D 1'); // The last created connection is implicitly added here What happens here is that PHP retain the last connection created by ibase_connect() and uses it as a "default" link, meaning you do not pass a connection resource to ibase_query() afterwards. Compare the example to: $link =3D ibase_connect('localhost:/path/to/some/db.gdb', 'user', 'password= '); ibase_query($link, 'UPDATE a_table SET a_column =3D 1'); // Explicit, as the first parameter is a connection resource Besides this, it has further magic behavior if the multiple connections are created with the same credentials as one in the same process, I'm not sure if this is fixed with Nikita's patch. > I'll add BOOLEAN to https://phpsurgery.org/tests/ibtest.php tomorrow, > but there are bugs in your link that don't show in the link I have been > using :( But some of them are not bugs ... Then use the link from the statistics page on bugs.php.net? There is probably a fair few for PDO_Firebird too you can find on that page --=20 regards, Kalle Sommer Nielsen kalle@php.net