if ($result === false) { //echo 'here'; $errors = codaserver_errors(); if (count($errors) == 1) { if ($errors[0]['errorcode'] == '1005') { if (empty($_POST['hostname']) || empty($_POST['port'])) { echo "Please enter a valid hostname and port. Hit back and try again!"; die; } $_SESSION['database_connection'] = codaserver_connect($_POST['hostname'], $_POST['port'], $_POST['username'], $_POST['password']); if ($_SESSION['database_connection'] === false) { unset($_SESSION['database_connection']); echo "You didn't enter a valid username and password for the desired host. Please hit back and try again!"; die; } $result = codaserver_query($_SESSION['database_connection'], $_POST['coda_query']); } } } } //var_dump($result); ?> <html> <head> <title>CodaServer Driver Tester</title> </head> <style> body { font-family: Helvetica, Arial, san-serif; font-size: 10pt; }
/** * Returns information about the parameters of the specified cron's procedure parameters. * * @param CodaServerConnection $resource_identifier * @param string $cron_name * @return resultset array */ function codaserver_describe_cron_parameters($resource_identifier, $cron_name) { if (empty($cron_name)) { throw new Exception('Cron name must be specified'); } return codaserver_query($resource_identifier, 'DESCRIBE CRON ' . $cron_name . ' PARAMETERS'); }