Skip to content

Instantly share code, notes, and snippets.

@firstfu
Last active February 22, 2017 16:53
Show Gist options
  • Save firstfu/4435fd34dc6ad5c6125b447b4c5b4d61 to your computer and use it in GitHub Desktop.
Save firstfu/4435fd34dc6ad5c6125b447b4c5b4d61 to your computer and use it in GitHub Desktop.
##No.1—- ##!如果省略where子句,則修改所有的記錄為指令的情況
UPDATE coffees set sup_id = 1, total = 1, sales = 1, price = 1 WHERE cof_code = 10000
##NO.2— 14心座用法
UPDATE TestDetail set answer = 10, score = 10 WHERE questionInfo = 1
##.3— 進階用法 + select
##欄位值直接加總
$sql = "update Member set point = point + 300 where email = ? and password = ?";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment