/ Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list / BLHTML funktion list /

  DB 2267 0
#DB# is an admin, database function
Rights to use the function #DB#:
  • Only Admin Accounts

  • #DB# Selects the active database and displays information about SQL server.
    Forum sets #SYSTEM[forum]# to "1", to exclude DB from forum.

    SYSTEM $secure variables:
    variables:  description:
    mainset to TRUE if the main web database is active
    connected#DB value=connected#
    active#DB show=database#
    linkLink Variable for current connection to SQL Server

    $secure variables: system/boot.php
    variables:  description:
    typeTyp of databas
    serverAddress to SQL server
    databaseDatabase name
    userDatabase user
    passwdPassword database user

    values:  defaults:  description:
    valueSet aktive database
    selectSwitches to another database for the SQL-user
    showserverDisplays the current path on the SQL Server
    databaseDisplays the name on current database
    encodingShowing the database character set
    verShowing the database version
    returnreturn=variable stores the results in $variable

    Managing multiple databases: system/boot.php
    $secure[1] = array
    => "mysql",
    => "localhost",
    => "database",
    => "Admin",
    => "password"
    // Typ of databas
    // Address to SQL server
    // Database name
    // Database user
    // Password database user

    // Database Connection to another MySQL server
    $secure[2] = array
    => "mysql",
    => "",
    => "prod_db",
    => "Admin2",
    => "password2"
    $secure[identifier] can be any PHP array name.

    Change current database:
    #DB value=2# // Sets the active external database 2: $secure[2]
            #READ table=AA value=3# // Read all the field from table AA from database 2 where key field is 3
            #SQLGET value(select * from AA where id=3)# // Read the same post as the READ example above

    #DB value=1# // Return to database 1: $secure[1]
    // If you dont set back the website database the website can not properly completing

    Sets the active internal database:
    #DB select=otherDB#
    // Sets the active database, where users on active MySQL server has rights to the database "otherDB"

    More information:
  • #READ#
  • #SQLGET#
  • Configure MySQL Create new MySQL user and database
  • FAQ: How do I connect to an external MySQL database?
  • BLHTML forum  

    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.0970 seconds