} else { echo "migrate fail\n"; echo $database->thisConnection()->error; } } break; case 'insert': $query = $database->buildInsertQuery($commandLine->getTable(), $commandLine->parseWithoutEquals(0)); if ($database->thisConnection()->query($query)) { echo "Insert Succeeded.\n"; } else { echo "Insert failed. Make sure your parameters are correct and you have needed foreign keys available.\n"; } break; case 'update': $query = $database->buildUpdateQuery($commandLine->getTable(), $commandLine->parseWithEquals(1), $commandLine->parseWithEquals(0, " AND ")); if ($database->thisConnection()->query($query)) { echo "Update Succeeded.\n"; } else { echo "Update failed. Make sure your parameters are correct and you have needed foreign keys available.\n"; } break; case 'delete': $query = $database->buildDeleteQuery($commandLine->getTable(), $commandLine->parseWithEquals(0)); if ($database->thisConnection()->query($query)) { echo "Delete Succeeded.\n"; } else { echo "Delete failed. Make sure your parameters are correct and you have needed foreign keys available.\n"; } break; case 'view':