Skip to content
Retrieve the structure of a database

Retrieve the structure of a database

By Mounir 1 min read

List the structure of a database.

array Structure_BDD( login, motdepasse, bdd)

Description

Retrieve the structure of the database bdd.

Parameters (required)

login: customer ID (nichandle)

motdepasse: the password

bdd: the database identifier (see List databases)

Return value

An array where each row contains an array with the structure:

  • [id] => database identifier
  • [field] => the field name
  • [key] => the key (empty for a regular field, MUL for a field with the search function enabled)

Error messages

No field must be left empty login

No field must be left empty motdepasse

No field must be left empty bdd

Authentication error (invalid login / password)

This database does not appear to belong to you

Example with NuSOAP

include('nusoap/nusoap.php');

$client = new soapclient('https://www.eml-srv.com/_soap/control.php'); // Remove the 's' from https if CURL is not installed

$parametres = array( 'login'=>'your_login', 'motdepasse'=>'your_password', 'bdd'=>'21' );

$variable=$client->call('Structure_BDD', $parametres);

// Retrieve the error, if any
if($client->fault)
die("Error:Code: {$client->faultcode}"
. "Detail: {$client->faultactor}"
. "Solution: {$client->faultstring}");

print_r($variable);

Example with PHP5

try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/control.php", 'uri'      => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1' ));

$variable = $client->Structure_BDD('your_login','your_password','21'); //or //$variable = $client->__soapCall(Structure_BDD,$parametres);

print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);

}
Last updated on