Jump to content

Update not working (sometimes)


websteve

Recommended Posts

I am trying to update a table, but I am getting intermittent errors. If I run the program and change the credit card number, for example, sometimes it works and other times it doesn't. 

Also, if I change the expiration to say, 11/12, it returns some type of decimal sequence. The expiration column is set for Varchar. I verified that the variables are being sent through. If anyone can tell me what I am doing wrong, I would appreciate it.

 

Here's the code:

 

$credit_update = "UPDATE Credit SET Credit_Card_Number='$credit_card_number', Expiration=$expiration WHERE ID = '" . mysql_real_escape_string($cust_id) . "'";

mysql_query($credit_update) or die('Could not connect to credit table: ' . mysql_error());

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/207750-update-not-working-sometimes/
Share on other sites

So, what is the column definition of Credit_Card_Number?

 

And what exactly is the symptom or error that leads you to believe that "it doesn't take." We only see the information you supply in your posts and "it doesn't take." could mean 3-6 different things, each with a different cause. You must be exact when describing problems.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.