of 10/10
Day 9

Day 9. SELECT INSERT UPDATE DELETE » The standard UPDATE statement. UPDATE table SET field1=val1, field2=val2 WHERE condition » Multiple table UPDATE

  • View
    214

  • Download
    0

Embed Size (px)

Text of Day 9. SELECT INSERT UPDATE DELETE » The standard UPDATE statement. UPDATE table SET field1=val1,...

  • Slide 1

Day 9 Slide 2 SELECT INSERT UPDATE DELETE Slide 3 The standard UPDATE statement. UPDATE table SET field1=val1, field2=val2 WHERE condition Multiple table UPDATE. UPDATE table1, table2 SET table1.field1=val1, table2.field2=val2 WHERE condition Slide 4 Can also use the mysql_affected_rows() function to retrieve number of records updated. With UPDATE, mysql_affected_rows() will return 0 if no changes were made to the records. This does not mean the query didnt work, only that the new value was the same as the old value. Slide 5 Form Page> Slide 6