473,884 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mysqli prepared update

6 New Member

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 6654
GazMathias
228 Recognized Expert New Member
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
2271
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 prepared statements 'remembered' by the server for a while between connections, so that new connections can take advantage of them, or are they really only useful for those pages/requests that are executing a huge amount of DML in a single shot.
1
3815
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 interface to use mysqli. Most of what the interface does is to simplify getting results in the form of arrays (ordered and associative). Most of the code using the interface used sql queries with placeholders and parameters. For that reason I'd...
1
2156
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: http://pear.php.net/package/DB/docs But since I'm not always online, is there a way I can download this ? Or if the documentation is derived from the classes, How can I build it?
2
2740
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 querys. (where you only change the parameters) But what if you do only ONE query; will it then be usefull to use prepared statements? Can it actuelly give better performance NOT to use prepared statements in that case? 2) Are there any DISadvantages...
13
3725
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 I am new to OOP? Thanks... Example; ======================================== <?php // webpage $newsignon = new newuser(); logon();
1
3823
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: $result = @mysql_query("SELECT * FROM images3 WHERE id=" . $img . " AND p=" .$p. ""); to access my database. I see that some people are using the
4
1857
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 is 4.1.22 (both higher than his server). All seems to work fine, but any statement that uses the bind (i.e. placing a ? in the sql statement, and then binding variables to it) does not work in my server, only his.
11
11109
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 PDO briefly but I've not used the mysqli extension yet. I've read a bit about it though, seems good and more OOP orientated (for the most part). But PDO seems more generic and transferable.
1
2038
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 sure that I am doing this correctly. Could anyone please show post a correct example of how to SELECT data from mysql via prepared statements via php mysqli() functions and how to INSERT data to mysql via prepared statements via php mysqli()...
6
9525
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 from $_POST data. All posted variables have to use the same name as the respective column in the database for this to work. I also have know what the primary - auto increment column is so I do not try to insert or update it. ...
0
9954
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11168
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10769
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10426
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9591
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7985
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4231
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.