WEB SQL HELP

Discussion in 'OT Technology' started by platinumalty, Oct 26, 2009.

  1. platinumalty

    platinumalty Yes, Id hit it

    Joined:
    Apr 30, 2004
    Messages:
    837
    Likes Received:
    0
    Location:
    All alone in the middle of nowhere.
    Im looking for someone to write me ONE sql query that UPDATES a field after checking a different Database for a certain input. I can prob Paypal you for your time, even though this will take someone who knows what their doing, 2 minutes. PM me or post for details?
     
    Last edited: Oct 26, 2009
  2. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Why don't you just post up the details
     
  3. platinumalty

    platinumalty Yes, Id hit it

    Joined:
    Apr 30, 2004
    Messages:
    837
    Likes Received:
    0
    Location:
    All alone in the middle of nowhere.
    ok!

    its need to update 'convert' = 1 where 'convert' = 1 in database test2 table account.

    im sure that makes NO sence..
     
  4. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    It does.. but you're changing the value convert to 1 where it is already 1?
     
  5. hank85

    hank85 sudo shred /dev/sda -f -v -z --iterations=6

    Joined:
    Jul 23, 2008
    Messages:
    4,360
    Likes Received:
    0
    Code:
    UPDATE database.thisTable SET 'convert' = 1 WHERE id IN (SELECT id FROM database.thatTable WHERE 'convert' = 1)
    Updates convert to 1 on thisTable where convert = 1 on thatTable. id is an identifying column shared by both tables.

    Back up your tables, didn't test this.
     
  6. platinumalty

    platinumalty Yes, Id hit it

    Joined:
    Apr 30, 2004
    Messages:
    837
    Likes Received:
    0
    Location:
    All alone in the middle of nowhere.
    hank, i love you man. Thanks alot, this got me on the right track.
     
  7. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,645
    Likes Received:
    15
    Location:
    Atlanta
    Nested queries ftw
     
  8. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Why not just check database 2 for the convert value in your script instead of database 1??
     
  9. Kevin

    Kevin New Member

    Joined:
    Aug 27, 2002
    Messages:
    87,634
    Likes Received:
    0
    Location:
    Michigan
    Reading the problem description has made me autistic.
     
  10. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Is this a thread you can delete without Pepsi getting mad??
     
  11. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,645
    Likes Received:
    15
    Location:
    Atlanta
    such threads exist? :eek3:
     
  12. platinumalty

    platinumalty Yes, Id hit it

    Joined:
    Apr 30, 2004
    Messages:
    837
    Likes Received:
    0
    Location:
    All alone in the middle of nowhere.

Share This Page