I have a class that currently will connect to a MySQL and MS SQL database.
It is easy add to this class support for all the other supported databases.
If you would like the code for this class, I will send it to you.

Let me know,
nicole

"Christian Azambuja Pagot" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!!
>
>     I am trying to create generic DB functions... (that could connect to
> any kind of database, just with few modifications..)
>     I created 2 functions... DB_Connect and DB_Disconnect... and I will
> create another one... DB_Query.
>
>     Follows the code:
>
> --------------------------------------------------------------------------
----------------------------
>
>     function DB_Connect($dbName)
>     {
>          static $$dbName;
>          $$dbName = mssql_connect ("servername","user","pass");
>     }
>
> --------------------------------------------------------------------------
----------------------------
>
>     function DB_Disconnect($dbName)
>     {
>          static $$dbName;
>          mssql_close($$dbName);
>     }
>
> --------------------------------------------------------------------------
----------------------------
>
>     So, in a program, I could do that:
>
> ------------------------------------------------------------------------
>
>     DB_Connect("db1");
>     DB_Connect("db2");
>     .
>     .
>     .
>     .
>     DB_Disconnect("db2")
>     DB_Disconnect("db1")
>
> ------------------------------------------------------------------------
>
>
>     But it is not working... and I donīt know why.. I know that the
> problem is related to the scoping of variables, but I am confused... Did
> you develop something like this already? (I did that in Perl once, and
> it worked perfectly!)
>
>     Thankx!!!!
>
> --
> =========================================
> = Christian Azambuja Pagot
> = ------------------------
> = Fones....: (51)9114-7717 / (51)476-4641
> = e-Mail...: [EMAIL PROTECTED]
> = Chave Publica disponivel
> =========================================
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com>
>
> mQENAzcy1O0AAAEIAKidc5Z07Up3Y9WpH0+S/xN5BQHMVoTMc08Njl92d+hEVclm
> heGNBrfXy04v2BDxeQu64AVXiyOZd16LtRDXEYVonRdvd1qsFPK8fkdxi9iQjPP8
> aJcUM5XY5zndnSTVj4K83nFAcnSwu/IAMXSx+/sQRSpAVtM4JlxAiDdFA8ZEJBXz
> CzzrZWncT9FDlrRFTBKoTqRWbUEIasyVtkHXzo4l2Wc/DzEkg96+hcL21FNDLldW
> VCog47ba9w8XAzpe23kGXIiqSnpodV85BRSjdVwBfFoQyfE64LsYYP+uxPvqduOT
> zJhKzBQO+MtDl+tAlM+Qs0YgPoACvJ8f84z0MNEABRG0M0NocmlzdGlhbiBBemFt
> YnVqYSBQYWdvdCA8YXphbWJ1amFAcG9ydG93ZWIuY29tLmJyPokBFQMFEDcy1O28
> nx/zjPQw0QEBdE4H/iBaJRmOxOGFyTkKM+6PinLaPvsBgvZAOsnW6Cs/QpvJH5mP
> MaCrKxH1EzLj3MVT38bAdmSL+iM/OTMoRWCi7BtcLW8dheOdmt5IVcHx1bQOJ8qe
> hMTn/2/KbvEawDD07OFTerRM+Ac158e/cK5VVC2vFUYuIja2XGD0yJvpndYAoTOe
> 2hSpPf7eCxUGF1CRsmdPMWKIz1fPqUROVxFalxKg0x7XuOjoD/XVNFmBq1j+NtIJ
> idYGjsGSu8s9NF3NaQgvWm9+obaaHhBPzJawZ6pyjCQ19GBi6AuYVpunq2vhzW0G
> ZLqrLPoB0EIzDFylnLY8+fFh84kLykRU1e8/ALw=
> =eTcy
> -----END PGP PUBLIC KEY BLOCK-----
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to