Professional Web Applications Themes

[PHP-DEV] differences in the RDBMS ext API's - PHP Development

Hi, ok while talking to marcus about sqlite it came up again that some ext have different function names for similar things which is really unnecessary. Here is a list of some most used (just a guestimate) functions. I used the mysql extension as the basis for the most part. Some functions obviously don't exist in the ext because the underlying RDBMS doesn't support it (like prepared queries, autoincrement and selecting a database etc.). Please correct me where I am wrong. Some query() functions might be actually be unbuffered_query() etc. And while doing such a boring work you tend to ...

  1. #1

    Default [PHP-DEV] differences in the RDBMS ext API's

    Hi,

    ok while talking to marcus about sqlite it came up again that some ext
    have different function names for similar things which is really
    unnecessary. Here is a list of some most used (just a guestimate)
    functions. I used the mysql extension as the basis for the most part.

    Some functions obviously don't exist in the ext because the underlying
    RDBMS doesn't support it (like prepared queries, autoincrement and
    selecting a database etc.).

    Please correct me where I am wrong. Some query() functions might be
    actually be unbuffered_query() etc. And while doing such a boring work
    you tend to make mistakes. Finally I don't know all API's by heart nor
    have I used all of them.

    Finally I want to mention again that I only looked at the function names
    and not at stuff like parameter order etc where I expect to be even more
    needless API differences.

    I removed the ext prefix for obvious reasons and I put diverging names,
    ext where there is no equivalent function or other comments in
    parenthesis:
    - affected_rows
    missing in ibase, ingress, odbc, ora
    sqlite_changes
    mssql_rows_affected
    ocirowcount
    - bind
    missing in ifx
    handled by execute in ibase, odbc
    mssql uses this method to handle stored procdures
    mysqli_bind_param
    ocibindbyname
    prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    sqlite, sybase
    - close
    ocilogoff
    - connect
    ocilogon
    oralogon
    sqlite_open
    - data_seek
    missing in ifx, ibase, ingress, odbc, oci, ora, pg
    sqlite_seek - due to spl
    - errno
    ifx_error
    odbc_error
    ora_errorcode
    missing in ibase, ingress, mssql, msql, oci, pg, sqlite, sybase
    - error
    ifx_errormsg
    ibase_errmsg
    mssql_get_last_message
    sybase_get_last_message
    odbc_errormsg
    ocierror
    pg_last_error
    sqlite_error_string
    missing in ingres
    - escape_string
    missing in fbsql, ifx, ibase, ingress, mssql, msql, odbc, oci, ora,
    sybase
    mysqli_real_escape_string
    - execute
    ifx_do
    mssql uses this method to handle stored procedures
    ociexecute
    ora_exec
    prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    sqlite, sybase
    - fetch_array
    missing in ifx, ibase
    ocifechtino
    ora_fetch_into
    - fetch_assoc
    ifx_fetch_row
    missing in ingress, msql, odbc, oci, ora, sqlite
    - fetch_object
    missing in ifx, oci, ora, sqlite
    - fetch_row
    missing in ibase, oci, ora, sqlite
    - free_query
    missing in ifx, mysqli, odbc, ora
    mysqli_stmt_close
    ocifreecursor
    prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    sqlite, sybase
    - free_result
    ocifreestatement
    missing in ingress, ora, sqlite
    - insert_id
    sqlite_last_insert_rowid
    not supported by ifx, ibase, ingres, mssql*, msql, odbc, oci, ora,
    pg, sybase*
    - next_result
    only exists in fbsql and mssql
    - num_fields
    ocinumcols
    ora_numcols
    - num_rows
    missing since buffering is not supported in ibase, oci
    ora_numrows
    - pconnect
    missing because it was found to be not feasible in mysqli
    ora_plogon
    ociplogon
    sqlite_popen
    - prepare
    ocip
    ora_p
    prepared not supported by fbsql, ingress, mssql, mysql, pg, sqlite,
    sybase
    - query
    is unbuffered in ibase
    pg_send_query
    missing in odbc, oci, ora
    - result
    missing in ifx, ibase, ingres, mysqli, oci, ora, sqlite
    - select_db
    missing in ifx, ibase, ingres, odbc, oci, ora, pg, sqlite
    - unbuffered_query
    missing in fbsql, ifx, ingres, mssql, msql, odbc, ora, pg
    ibase_query
    ociexecute

    regards,
    Lukas Smith
    [email]smithbackendmedia.com[/email]
    _______________________________
    BackendMedia
    [url]www.backendmedia.com[/url]
    [email]berlinbackendmedia.com[/email]

    Linn Zwoch Smith GbR
    Pariser Str. 44
    D-10707 Berlin

    Tel +49 30 83 22 50 00
    Fax +49 30 83 22 50 07

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Lukas Smith Guest

  2. #2

    Default Re: [PHP-DEV] differences in the RDBMS ext API's

    I don't have the time to answer this in more detail, but some of these
    calls are just not supported by ODBC (i.e. select_db). Some are, I just
    haven't had the time to commit the patches that create the functionality
    and fully test it.

    On Wed, 24 Sep 2003, Lukas Smith wrote:
    > Hi,
    >
    > ok while talking to marcus about sqlite it came up again that some ext
    > have different function names for similar things which is really
    > unnecessary. Here is a list of some most used (just a guestimate)
    > functions. I used the mysql extension as the basis for the most part.
    >
    > Some functions obviously don't exist in the ext because the underlying
    > RDBMS doesn't support it (like prepared queries, autoincrement and
    > selecting a database etc.).
    >
    > Please correct me where I am wrong. Some query() functions might be
    > actually be unbuffered_query() etc. And while doing such a boring work
    > you tend to make mistakes. Finally I don't know all API's by heart nor
    > have I used all of them.
    >
    > Finally I want to mention again that I only looked at the function names
    > and not at stuff like parameter order etc where I expect to be even more
    > needless API differences.
    >
    > I removed the ext prefix for obvious reasons and I put diverging names,
    > ext where there is no equivalent function or other comments in
    > parenthesis:
    > - affected_rows
    > missing in ibase, ingress, odbc, ora
    > sqlite_changes
    > mssql_rows_affected
    > ocirowcount
    > - bind
    > missing in ifx
    > handled by execute in ibase, odbc
    > mssql uses this method to handle stored procdures
    > mysqli_bind_param
    > ocibindbyname
    > prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    > sqlite, sybase
    > - close
    > ocilogoff
    > - connect
    > ocilogon
    > oralogon
    > sqlite_open
    > - data_seek
    > missing in ifx, ibase, ingress, odbc, oci, ora, pg
    > sqlite_seek - due to spl
    > - errno
    > ifx_error
    > odbc_error
    > ora_errorcode
    > missing in ibase, ingress, mssql, msql, oci, pg, sqlite, sybase
    > - error
    > ifx_errormsg
    > ibase_errmsg
    > mssql_get_last_message
    > sybase_get_last_message
    > odbc_errormsg
    > ocierror
    > pg_last_error
    > sqlite_error_string
    > missing in ingres
    > - escape_string
    > missing in fbsql, ifx, ibase, ingress, mssql, msql, odbc, oci, ora,
    > sybase
    > mysqli_real_escape_string
    > - execute
    > ifx_do
    > mssql uses this method to handle stored procedures
    > ociexecute
    > ora_exec
    > prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    > sqlite, sybase
    > - fetch_array
    > missing in ifx, ibase
    > ocifechtino
    > ora_fetch_into
    > - fetch_assoc
    > ifx_fetch_row
    > missing in ingress, msql, odbc, oci, ora, sqlite
    > - fetch_object
    > missing in ifx, oci, ora, sqlite
    > - fetch_row
    > missing in ibase, oci, ora, sqlite
    > - free_query
    > missing in ifx, mysqli, odbc, ora
    > mysqli_stmt_close
    > ocifreecursor
    > prepared not supported by fbsql, ingres, mssql, msql, mysql, pg,
    > sqlite, sybase
    > - free_result
    > ocifreestatement
    > missing in ingress, ora, sqlite
    > - insert_id
    > sqlite_last_insert_rowid
    > not supported by ifx, ibase, ingres, mssql*, msql, odbc, oci, ora,
    > pg, sybase*
    > - next_result
    > only exists in fbsql and mssql
    > - num_fields
    > ocinumcols
    > ora_numcols
    > - num_rows
    > missing since buffering is not supported in ibase, oci
    > ora_numrows
    > - pconnect
    > missing because it was found to be not feasible in mysqli
    > ora_plogon
    > ociplogon
    > sqlite_popen
    > - prepare
    > ocip
    > ora_p
    > prepared not supported by fbsql, ingress, mssql, mysql, pg, sqlite,
    > sybase
    > - query
    > is unbuffered in ibase
    > pg_send_query
    > missing in odbc, oci, ora
    > - result
    > missing in ifx, ibase, ingres, mysqli, oci, ora, sqlite
    > - select_db
    > missing in ifx, ibase, ingres, odbc, oci, ora, pg, sqlite
    > - unbuffered_query
    > missing in fbsql, ifx, ingres, mssql, msql, odbc, ora, pg
    > ibase_query
    > ociexecute
    >
    > regards,
    > Lukas Smith
    > [email]smithbackendmedia.com[/email]
    > _______________________________
    > BackendMedia
    > [url]www.backendmedia.com[/url]
    > [email]berlinbackendmedia.com[/email]
    >
    > Linn Zwoch Smith GbR
    > Pariser Str. 44
    > D-10707 Berlin
    >
    > Tel +49 30 83 22 50 00
    > Fax +49 30 83 22 50 07
    >
    >
    >---------------------------------------------------------------<
    Dan Kalowsky "I thought you died alone,
    [url]http://www.deadmime.org/~dank[/url] a long long time ago."
    [email]dank-nomaps-deadmime.org[/email] - "The Man Who Sold the World"
    [email]kalowskyphp.net[/email] David Bowie

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Dan Kalowsky Guest

  3. #3

    Default RE: [PHP-DEV] differences in the RDBMS ext API's

    > From: Dan Kalowsky [mailto:dankdeadmime.org]
    > Sent: Wednesday, September 24, 2003 8:00 PM
    > I don't have the time to answer this in more detail, but some of these
    > calls are just not supported by ODBC (i.e. select_db). Some are, I
    just
    > haven't had the time to commit the patches that create the
    functionality
    > and fully test it.
    Yeah. I am not trying to slap wrist here :-)

    And yes obviously some functions simply don't apply to certain
    extensions.

    But I am hoping that maybe we can come up with a unified naming scheme
    and one by one move the existing extensions over.

    Finally the names I choose to use in the list ar not my personal
    recommendations. For example _free_query is not a good name for a
    function that frees a prepared query.

    Also I never liked using "field" instead of "column".

    I was just trying to start a discussion.

    Regards,
    Lukas

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Lukas Smith Guest

  4. #4

    Talking Re: [PHP-DEV] differences in the RDBMS ext API's

    elow . :D how are you all?^^
    CENA16 Guest

Similar Threads

  1. RDBMS
    By lak25 in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: August 26th, 09:45 PM
  2. [PHP-DEV] differences in the RDBMS ext API's
    By Lukas Smith in forum PHP Development
    Replies: 1
    Last Post: September 30th, 04:46 PM
  3. [PHP-DEV] differences in the RDBMS ext API's
    By Marc Boeren in forum PHP Development
    Replies: 1
    Last Post: September 25th, 02:46 PM
  4. [Fwd: [PHP-DEV] differences in the RDBMS ext API's]
    By Manfred Stienstra in forum PHP Development
    Replies: 0
    Last Post: September 25th, 10:37 AM
  5. [PHP-DEV] differences in the RDBMS ext API's
    By Ard Biesheuvel in forum PHP Development
    Replies: 0
    Last Post: September 25th, 09:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139