Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. $cy = $_GET["Cycle"];
  3. $myServer = "LAMSSQL";
  4. $myUser = "sa";
  5. $myPass = "bevotexas";
  6. $myDB = "APNCDR_new";
  7. $dbhandle = mssql_connect($myServer, $myUser, $myPass)
  8. or die("cant connect");
  9. $Selected = mssql_Select_db($myDB, $dbhandle)
  10. or die("cant connect to db");
  11. $query = "SELECT INVDATE FROM InvoicePrint WHERE (CYCLE=$cy) GROUP BY INVDATE";
  12.  
  13. $result = mssql_query($query);
  14. $numRows = mssql_num_rows($result);
  15. while( $row = mssql_fetch_array($result))
  16. {
  17. $d1 = date('m/d/Y', strtotime($row["INVDATE"]));
  18. echo "<option value='".$d1."'>".$d1."</option>";
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement