Jump to content

simple question I think...


pstanbra

Recommended Posts

I'm using paypal IPN to send data to a mySQL db - no problems there.

As paypal only accepts so many "custom" variables - i need to set my return page to another form to accept more details and then add to the db.

 

So here is my question.

In the table - there is an ID as the unique key.

 

When I write my paypal values to the db - the ID is automatically generated and isnt in a VARIABLE.

soooooooo!!!!

 

If I write a function to put the extra variables from a form into the same row in the table - how do i do this.

  Do i - Select the last row of the database and add the extra values to my newly added fields in the table

  or - is there another way to do this. If I select the last row of the table - is there not a possibility of this being a new row created by another record a second ago . How safe is selecting the last row. 

 

What do you suggest.

 

 

Link to comment
Share on other sites

Is their a way of telling what data is added first to use as a handle for the row you want to add the data too, then you can use UPDATE table SET col1='$var1', col2='$var2' WHERE col3='$var3'  Otherwise there is no way of testing where you put the data.

 

So use Select on a column where you will know the data i.e name or timestamp both would be better then use one of those to update the specific row, good luck

Link to comment
Share on other sites

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.