Is there a way to make queries overwrite instead of just stopping at duplicates? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    RoyPwns's Avatar Sergeant
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to make queries overwrite instead of just stopping at duplicates?

    The fact queries stop when something is a duplicate is really annoying, and I need a way to make it so that it simply overwrites the dupes instead of halting and making me have to delete them one by one...

    Is there a way to make queries overwrite instead of just stopping at duplicates?
  2. #2
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well before you execute them, make sure they're not already in the database, or change the ID's.
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  3. #3
    RoyPwns's Avatar Sergeant
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...That's entirely my point, I don't want to have to do that, I just want to be able to overwrite everything already in the database.

  4. #4
    dragonowner's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    208
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the REPLACE INTO command. Example:
    Code:
    "REPLACE INTO `page_view` (`id`, `username`, `ip`, `date`) VALUES ('', '$user', '$ip', '$view_date')";

  5. #5
    RoyPwns's Avatar Sergeant
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, thanks
    Last edited by RoyPwns; 06-04-2010 at 02:15 AM.

Similar Threads

  1. Is there a way to make a script for the Arreat Core?
    By fieldy22 in forum D3 Gold profiles
    Replies: 5
    Last Post: 06-15-2012, 06:12 PM
  2. Is there any way to make a website event if verizon blocks port 80?
    By project anthrax in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 06-13-2008, 11:54 PM
  3. Is there a way to make mounts not require riding skill nor level ?
    By Wheeze201 in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-22-2007, 07:06 PM
  4. Is there a way to make mounts not require riding skill nor level ?
    By Wheeze201 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 12-22-2007, 12:27 PM
All times are GMT -5. The time now is 05:32 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search