Jump to content

[SOLVED] Update / Add only 1 row


andrewgarn

Recommended Posts

in order to update only 1 row, you need a where clause in your update query that specifies unique data for that row, like an id# or something, that's unique for that row.  example:

 

id name

0 adam

1 mark

2 julie

3 adam

 

update table set name = 'james' where id = 0

 

would result in this:

 

id name

0 james

1 mark

2 julie

3 adam

 

no...

 

perhaps the problem is with your table structure.  Perhaps you have your "date" column setup to automatically update to the current timestamp upon updating or something?

 

How do I check that?

 

and i understood there was a problem with updating table name record without `` as it was a mysql word

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.