<?
global $LINENUMBERS;$LINENUMBERS=1;
$orderby=$_REQUEST[`orderby`];
if ($orderby==~~) $orderby=~ CaseID, fID, qOrder  ~;
echo ~<center>As of: <b>~,Now().~</b></center>~;
if (ShowQueryResultScalar(~SELECT count(*) from  Responses WHERE isDeleted=0 and rOK=0 and CaseID<>-1~)==0)   echo ~<p>There are no edit failures~;
else   ShowQueryResult(~SELECT CaseID, FormQuestions.fID, ResponsesDecoded.qID, tText as Value, qPostLogic FROM ResponsesDecoded,Questions,FormQuestions WHERE isDeleted=0 and rOK=0 and CaseID<>-1 and Questions.qID=ResponsesDecoded.qID and FormQuestions.qID=ResponsesDecoded.qID order by $orderby~);
?>