Forums

$wpdb class, how to update on duplicate key (4 posts)

  1. neonWired
    Member
    Posted 10 months ago #

    I know there's an insert and update function but is there a way to update on duplicate key?

  2. apljdi
    Member
    Posted 10 months ago #

    Sure. You can feed $wpdb->query any MySQL command you want.

  3. neonWired
    Member
    Posted 10 months ago #

    I know but a function or argument in the insert function would be useful

  4. apljdi
    Member
    Posted 10 months ago #

    As far as I know, there isn't. Submit a patch if you really feel strongly about it.

Reply

You must log in to post.

About this Topic