Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/xnpal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.30 by youi, Thu Feb 3 12:02:42 2005 UTC revision 1.31 by aga, Wed Feb 9 02:14:15 2005 UTC
# Line 1373  ZEND_FUNCTION(xnp_test_uids) Line 1373  ZEND_FUNCTION(xnp_test_uids)
1373    
1374    
1375  /** DBに接続する。既に接続中の接続は閉じられる。<br>  /** DBに接続する。既に接続中の接続は閉じられる。<br>
1376          int initialize_db( string host[, string user[, string password[, string dbname[, string prefix]]]] );          int initialize_db( string host[, string user[, string password[, string dbname[, string prefix, int dbtype]]]] );
1377          @param host      接続先。省略時はNULL          @param host      接続先。省略時はNULL
1378          @param user      DB接続時のユーザ名。省略時はNULL          @param user      DB接続時のユーザ名。省略時はNULL
1379          @param password  DB接続時のパスワード。省略時はNULL          @param password  DB接続時のパスワード。省略時はNULL
1380          @param dbname    DB接続時のDB名。省略時は""          @param dbname    DB接続時のDB名。省略時は""
1381          @param prefix    XOOPS DB のprefix。          @param prefix    XOOPS DB のprefix。
1382            @param dbtype    1=MySQL 2=SQLite。common.h参照
1383          @return 0 success <br>          @return 0 success <br>
1384    */    */
1385  ZEND_FUNCTION(xnp_initialize_db)  ZEND_FUNCTION(xnp_initialize_db)
# Line 1389  ZEND_FUNCTION(xnp_initialize_db) Line 1390  ZEND_FUNCTION(xnp_initialize_db)
1390          char *password;          char *password;
1391          char *dbname;          char *dbname;
1392          char *prefix;          char *prefix;
1393            long dbtype;
1394    
1395          /* get the number of arguments */          /* get the number of arguments */
1396          int argNum = ZEND_NUM_ARGS();          int argNum = ZEND_NUM_ARGS();
# Line 1414  ZEND_FUNCTION(xnp_initialize_db) Line 1416  ZEND_FUNCTION(xnp_initialize_db)
1416          if (argNum < 5) prefix = "";          if (argNum < 5) prefix = "";
1417          else            prefix = getZvalString( parameters[4] );          else            prefix = getZvalString( parameters[4] );
1418    
1419          result_t result = initializeDB( host, user, password, dbname, prefix );          if (argNum < 6) dbtype = DBTYPE_MYSQL;
1420            else            dbtype = getZvalInt( parameters[5] );
1421    
1422            result_t result = initializeDB( host, user, password, dbname, prefix, (dbtype_t)dbtype );
1423    
1424          RETURN_LONG(result);          RETURN_LONG(result);
1425  }  }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26