Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.