469,612 Members | 1,674 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

mysqli prepared update

6

hi, new to this. Will someone tell me why this doesn't update?

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // Include config file
  3. include 'getprerentdb.php';
  4.  
  5. $amtdue = 0.00;  // ****************************************
  6. $duedate='duedate';
  7. $prevbal=0.00;
  8. $latechg=0.00;
  9. $secdep=0.00;
  10. $damage=0.00;
  11. $courtcost=0.00;
  12. $nsf=0.00;
  13. $paidsum=0.00;
  14. $id="id";
  15. $receiptno='0';
  16.  
  17. $sql = "UPDATE payfile SET
  18. amtpaid=?, duedate=DATE_ADD(?, INTERVAL 1 month), prevbal=?, latechg=?, secdep=?, damage=?, courtcost=?, nsf=?, hudpay=?, datepaid=?, paidsum=?
  19. WHERE id=?";  
  20. $stmt = $conn->prepare($sql);
  21. $stmt->bind_param("dsdddddddsdi", $amtpaid, $duedate, $prevbal, $latechg, $secdep, $damage, $courtcost, 
  22. $nsf, $hudpay, $datepaid,  $paidsum,  $id);
  23. $stmt->execute();
  24. ?>
  25.  
3 Weeks Ago #1
1 5077
GazMathias
224 Expert 128KB
Hi,

What error messages are you seeing?

From what you have posted I can see that amtpaid, hudpay and datepaid are not declared and you have set duedate to 'duedate'.

Gaz
3 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Mark | last post: by
1 post views Thread by webguynow | last post: by
2 posts views Thread by ojorus | last post: by
13 posts views Thread by Schmidty | last post: by
4 posts views Thread by sugapablo | last post: by
11 posts views Thread by macca | last post: by
6 posts views Thread by Chuck Anderson | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.