473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

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.  
Nov 10 '21 #1
1 6601
GazMathias
228 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
Nov 11 '21 #2

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

Similar topics

1
by: Mark | last post by:
hello! mysqli in PHP5 comes with prepared statements functionality. However, without persistent connections or connection pooling in this code library, one has to ask: why bother? are...
1
by: Tom D | last post by:
I'm rewriting a database interface that our company currently has. Currently it's using the Pear::DB interface, but we found that that was introducing a bit too much overhead. I'm rewriting the...
1
by: webguynow | last post by:
I'm trying to build a good DB Layer on top of Pear::DB Are there any forums or knowledge base sites on this direct topic ? I've been using the documentation at:...
2
by: ojorus | last post by:
Hi! Some questions regarding the mysqli-extension (php5) 1) Prepared statements: If I understand things right, prepared statements will give better performance if you make several similar...
13
by: Schmidty | last post by:
If you do a page reload with $_SERVER will your program lose a mysqli connection upon the reload of the page? Would this code work? I need to know how to carry over a connection between methods as...
1
by: eholz1 | last post by:
Hello PHP Group, Is there any advantages (or disadvantages) in using mysqli instead of mysql (querys, connections to database, etc). I am currently using mysql_connect, and things like this:...
4
by: sugapablo | last post by:
I have a website that I was moving from another server to mine for somebody. This website uses mysqli functions. mysqli extensions are installed on my Linux server, PHP is 5.1.6 and and MySQL...
11
by: macca | last post by:
Hi, What should I be using for general MySQL database access? I've been using the traditional mysql extension for ages, but I'm trying to update my style to a more OOP paradigm. I've used...
1
by: lazukars | last post by:
I have done a good amount of research on prepared statements in php. The problem is that I have found various examples on how to select and insert information into a Mysql database. I want to make...
6
by: Chuck Anderson | last post by:
Granted, this is mostly a mysql question, but I think understanding the Php makes it easy to understand why my question is necessary. I'm writing a Php loop to create INSERT and UPDATE queries...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.