copy or duplicate a mysql record

copy a record in mysql: in one line, woot

(Via grumpy beer geek.)

Update:Caveat: unless you’re trying to copy a record to the same table that has an auto_increment index on it. No go. Pisser.

Bookmark and Share

Story pulse

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE 1=1 AND post_id = 911 GROUP BY hit_date' at line 5]
SELECT SUM(hit_count) AS hits, hit_date FROM WHERE 1=1 AND post_id = 911 GROUP BY hit_date


Leave a comment