Guest User

Untitled

a guest
Dec 11th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. $conn = odbc_connect("Driver={SQL Server};Server=server2;Database=omsdata;", "sa", "3eadquZ");
  3. $saleDate = sprintf("%0.0f", $time / (60 * 60 * 24) + 61729);
  4. $queryInsBuy = "INSERT INTO retailSales (invsNum, prod_cd, descrip, price, tax, qty, cost, line, saleDate, saleTime)
  5. VALUES (999999, '23-er45', 'descrip', 45.99, .3768, 1, , , , )";
  6. $resInsBuy = odbc_exec($conn, $queryInsBuy) or die (odbc_errormsg());
  7.  
  8. echo $queryInsBuy;
  9.  
  10.  
  11.  
  12.  
  13. $sql = "SELECT * FROM retailSales WHERE invsNum = '15495' ";
  14. //$sql = "SELECT * FROM invList WHERE id = '4951' ORDER BY seq ASC";
  15. $rs = odbc_exec($conn, $sql);
  16. while ( $row = odbc_fetch_array($rs) )
  17. {
  18. print_r($row);
  19.  
  20. }
  21.  
  22. ?>
Add Comment
Please, Sign In to add comment