function

connect . database . sncode

VERSIONlatest Connect to a databse

CONNECT

NAME

connect - Connect to a databse

SYNOPSIS

connect(dbhost:string,dbuser:string,dbpass:string,dbname:string,dbchar:string[, dbport);

DESCRIPTION

This function is used to connect to an altername database.

PARAMETERS

dbhost
Host to connect. Default is 127.0.0.1
dbuser
User
dbpass
Password
dbname
Database name
dbport
          Database port. Default is 0 which is the normal port. Avalaible at version 5.91.
dbchar
Character set. Default is utf8.
 

RETURN

This function return a pointer to the database which is used in all database function

EXAMPLES

            a = connect(dbname:"extenso",dbpass:"....",dbuser:"extenso");
            a.type();
            x=sql(db:a,single:true,wantarray:true,"SELECT DATABASE()");
            x.rows[0];
            x=sql(single:true,wantarray:true,"SELECT DATABASE()");
            x.rows[0];
            disconnect(a);

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>