GET and Update

I’m currently working on an iPhone app which passes data to a browser. Using this data, I need to update the database.

I’m having one of those duhhh days where I’m breaking pretty much everything ha!

I’ll be updating a row by ID, but could be updating 1 or more fields. How can I tell what I need to update? I.e. if I try and update the whole row won’t I wipe any empty fields?

Would I need to use a case switch or is there a simpler method?

Thanks

=======
Edit:

Coding in PHP

It was a duhhh moment. I’m only going to be passing variables that I need to update. [[[ Need Sleep ]]]

Never mind, I was having a duh moment. I’ll only be passing what I need to update.

EDIT:
Nope back to duhhh.

If say, I have a table with:

  • ID
  • Name
  • Location
  • Time

And I want to update the row dynamically but maybe not all fields at once… How would I do it?

1 query may be:

$id=1&name=foo

Whereas another one may be:

$id=1&name=foo&time=10

Sponsor our Newsletter | Privacy Policy | Terms of Service