Jump to content

bggas400

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by bggas400

  1. if ($fdsort == "TODAY"){ $query = "Select * from ALLFTM100.ANHISTL2 where HSDATE >= '$slcdates' "; print("<h4>Townsend transfers on $system for $slcdate only. </h4>"); } if($fdsort <> "TODAY"){ $query = "Select * from ALLFTM100.ANHISTL2 where HSSESN = '$fdsort' order by HSDATE desc, HSTIME desc"; print("<h4>Townsend transfers for $fdsort on $system listed in descending order by date/time starting from $slcdate. </h4>"); } ?> <h3> <a href="javascript:history.go(-1)"style="color:blue;">Back to previous page</a></h3> <br > </br> <?php //Execute query $queryexe = db2_exec($conn, $query) ; while(db2_fetch_row($queryexe)) { $HSSESN = db2_result($queryexe, 'HSSESN'); // System Name $HSLOGI = db2_result($queryexe, 'HSLOGI'); // System Roll $HSRETN = db2_result($queryexe, 'HSRETN'); // System Ping $HSDATE = db2_result($queryexe, 'HSDATE'); // System Maintenance $HSTIME = db2_result($queryexe, 'HSTIME'); // System Telnet Status $HSTEXT = db2_result($queryexe, 'HSTEXT'); // System FTP Status print("<table>"); print("<td WIDTH=100>"); print("$HSSESN</td><td width=10> <a href=http://orion/iTownsendTranslog.php?system=$system&HSLOGI=$HSLOGI&HSSESN=$HSSESN >$HSLOGI</td> <td width=10> $HSRETN</td> <td width=10> $HSDATE</td> <td width=10> $HSTIME</td> <td width=100> $HSTEXT \n"); print("</td> \n"); } print("</tr>"); print("</tbody>"); print("</table>"); db2_close($conn); ?> Hi, Pretty new to PHP. I have this piece of code which I've inherited. How can I modify it to where, if the select statement doesn't return any data, that I can print or echo a message stating that... "No transfers have run recently"? I was thinking of some sort of $result variable but I'm not getting anywhere. This is running on the IBM i - iSeries. Thanks for any assistance, bgg
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.