downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ibase_affected_rows> <Funções para Firebird/InterBase
[edit] Last updated: Fri, 24 May 2013

view this page in

ibase_add_user

(PHP 5)

ibase_add_userAdiciona um usuário a um banco de dados seguro (apenas para IB6 ou posterior)

Descrição

bool ibase_add_user ( resource $service_handle , string $user_name , string $password [, string $first_name [, string $middle_name [, string $last_name ]]] )

O PHP 4 usa server, dba_user_name e dba_user_password ao invés do parâmetro service_handle.

Aviso

Esta função não está documentada; somente a lista de argumentos está disponível.

Valor Retornado

Retorna TRUE em caso de sucesso ou FALSE em caso de falha.

Veja Também

  • ibase_modify_user() - Modifica um usuário para um banco de dados seguro (somente para IB6 ou posterior)
  • ibase_delete_user() - Exclui um usuário de um banco de dados seguro (apenas para o IB6 ou posterior)



add a note add a note User Contributed Notes ibase_add_user - [1 notes]
up
0
pabloj
7 years ago
You can create users on Firebird/Interbase this way:

<?php
   
// attach to the server with proper privileges
   
if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
       
// get server version and implementation strings
       
$server_info  = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
                      .
' / '
                     
. ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
       
//ibase_service_detach($service);
   
}
    else {
       
$ib_error = ibase_errmsg();
    }
echo
$server_info;

//add a new user with name 'pippo' and password 'pp'
if (($result = ibase_add_user($service, 'pippo', 'pp')) != FALSE) {
        echo
'User created';
       
ibase_service_detach($service);
    }
    else {
       
$ib_error = ibase_errmsg();
       
//detach from server
       
ibase_service_detach($service);
    } 
?>

 
show source | credits | sitemap | contact | advertising | mirror sites