rawCmd is a method of the Loader class (loader module). You use this method to send a Loader command $cmd_string to the Loader.
Errors returned by the Loader 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.
Syntax
$result = $session->rawCmd ($cmd_string);
More information: Loader, Loader Commands and SQL Statements
The result of the Loader command is returned.
You specify a valid Loader command:
$result = $session->cmd ('CREATE TABLE testtable2 (colname INTEGER)')
print "result: '$result'\n";
Output:
result: 'OK
'
You specify an invalid Loader command:
$result = $session->cmd ('invalid command')
print "result: '$result'\n";
Output:
result: 'ERR -25010 SQL error -3005 = Invalid SQL statement (error position: 1)'