Loading ...
Sorry, an error occurred while loading the content.

Proposed little change to manager_mysql.php

Expand Messages
  • Stefano
    Hello, In the latest released Metabase the method CreateDatabase() inside manager_mysql tests for existance of mysql_create_db function. If that function
    Message 1 of 2 , Jul 17, 2004
    • 0 Attachment
      Hello,

      In the latest released Metabase the method CreateDatabase() inside
      manager_mysql tests for existance of mysql_create_db function. If that
      function exists goes for it, otherwise issues a "CREATE DATABASE" query.

      This is fine and fixes the problem of older versions
      of metabase with MySQL 4 php api. Unfortunately on a test windows XP
      installation (EasyPHP 1.7 packaging Apache 1.3.27 - PHP 4.3.3 - MySQL
      4.0.15) despite executes correctly mysql_create_db() gives a warning
      about the function being deprecated.

      Therefore I suggest to modify the command adding a @ modifier to
      suppress the warning:

      $success=@mysql_create_db($name,$db->connection);

      A second possibility that could be even better would to remove the use
      of mysql_create_db and always go with a CREATE DATABASE query.

      Regards,
      Stefano
    • Manuel Lemos
      Hello, ... Humm... I have silenced the warning in the latest release. Now, I have just noticed that I did not make any release after that. I think I will do it
      Message 2 of 2 , Jul 17, 2004
      • 0 Attachment
        Hello,

        On 07/17/2004 02:01 PM, Stefano wrote:
        > Hello,
        >
        > In the latest released Metabase the method CreateDatabase() inside
        > manager_mysql tests for existance of mysql_create_db function. If that
        > function exists goes for it, otherwise issues a "CREATE DATABASE" query.
        >
        > This is fine and fixes the problem of older versions
        > of metabase with MySQL 4 php api. Unfortunately on a test windows XP
        > installation (EasyPHP 1.7 packaging Apache 1.3.27 - PHP 4.3.3 - MySQL
        > 4.0.15) despite executes correctly mysql_create_db() gives a warning
        > about the function being deprecated.
        >
        > Therefore I suggest to modify the command adding a @ modifier to
        > suppress the warning:
        >
        > $success=@mysql_create_db($name,$db->connection);
        >
        > A second possibility that could be even better would to remove the use
        > of mysql_create_db and always go with a CREATE DATABASE query.

        Humm... I have silenced the warning in the latest release. Now, I have
        just noticed that I did not make any release after that. I think I will
        do it soon when I add a few planned maintenance features. Meanwhile you
        may want to get the most upto date version from MetaL CVS repository:

        http://www.meta-language.net/download.html#cvs



        --

        Regards,
        Manuel Lemos

        PHP Classes - Free ready to use OOP components written in PHP
        http://www.phpclasses.org/

        PHP Reviews - Reviews of PHP books and other products
        http://www.phpclasses.org/reviews/

        Metastorage - Data object relational mapping layer generator
        http://www.meta-language.net/metastorage.html
      Your message has been successfully submitted and would be delivered to recipients shortly.