Background documentationrawCmd Method (DBM Class) Locate this document in the navigation structure

 

rawCmd is a method of the DBM Class (dbm Module). You use it to send a DBM command $cmd_string to the DBM server.

Syntax Syntax

  1. $result = $session->rawCmd ($cmd_string);
End of the code.

More information: Database Manager CLI, Overview of All DBM Commands

Result

The result of the DBM command is returned.

Errors returned by the DBM server do not raise an exception. The return code starts with OK if the command was executed successfully; it starts with ERR if the command failed.

Example

You specify a valid DBM command.

$result = session->rawCmd ('db_state');

print "$result\n";

Output:

OK

State

OFFLINE

You specify an invalid DBM command.

$result = $session->rawCmd ('invalid command');

print "result\n";)

Output:

ERR

-24977,ERR_COMMAND: unknown command "invalid"

More Information

cmd method (DBM class)