computeDBQuery function

Store the given input in a remote database table. It will be stored either in a permanent table or a temporary table depending on tablePrefix.