REPLACE versus INSERT in SQL

According to the documentation, the difference is: REPLACE works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted. So what it does: Try to match … Read more

Vim Search/Replace, meaning of %s

% is the range over which the :s command (short for :substitute) will be run. % itself is short for the range :1,$, which means Line 1 to the last line in the buffer. The Vim help has a couple topics (user manual – :help 10.3, reference manual – :help cmdline-ranges) describing the forms that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)