Buying Need a simple MySQL program writte

Discussion in 'Programming' started by tyankee, Aug 16, 2012.

  1. #1
    i need a simple MySQL program written to read one table, and then read a second table using one of the fields from the second file as a key. and then it updates a price field in the second table. i'm sure i could do it but would take me an hour when it really should only take about 5 minutes.. first good quote from someone with good feedback, gets the gig..
     
    tyankee, Aug 16, 2012 IP
  2. edduvs

    edduvs Well-Known Member

    Messages:
    394
    Likes Received:
    31
    Best Answers:
    3
    Trophy Points:
    160
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #2
    It should be pretty simple with mysql triggers or a simple PHP page to be ran by a CRON , your decision.
     
    edduvs, Aug 17, 2012 IP
  3. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    As Seller:
    100% - 3
    As Buyer:
    100% - 0
    #3
    still looking.. please only PM me if you also send your bid.. i immediately delete any PM's without a bid.. and if you have zero or limited feedback, i won't look at your bid. Here are the specs:

    Table #1 - mr_products

    1 itemno int(6)
    2 retail-price decimal(12,2)
    3 wholesale-price decimal(12,2)
    4 wholesale-price2 decimal(12,2)

    Table #2
    1 id int(10)
    2 catid int(11)
    3 title varchar(255)
    4 short_desc varchar(255)
    5 full_desc text
    6 meta_title varchar(255)
    7 meta_keywords varchar(255)
    8 meta_description varchar(255)
    9 thumb_image varchar(255)
    10 detail_image varchar(255)
    11 large_image varchar(255)
    12 list_price decimal(12,2)
    13 wholesale_price decimal(12,2)
    14 price decimal(12,2)
    15 sale_price decimal(12,2)
    16 flat_rate_shipping decimal(12,2)
    17 in_stock int(10)
    18 vendor_stock int(11)
    19 num_sold int(10)
    20 weight float No
    21 box_length float No
    22 box_width float No
    23 box_height float No
    24 max_per_box float No
    25 charge_shipping enum('y', 'n')
    26 realtime_override enum('y', 'n')
    27 charge_tax enum('y', 'n')
    28 is_new enum('y', 'n')
    29 is_featured enum('y', 'n')
    30 ship_seperatly enum('y', 'n')
    31 viewable enum('y', 'n')
    32 orderable enum('y', 'n')
    33 rewards_earnable enum('y', 'n')
    34 rewards_redeemable enum('y', 'n')
    35 require_addtocart enum('y', 'n') utf8_unicode_ci No n Change Change Drop Drop More Show more actions
    36 allow_addtocart enum('y', 'n') utf8_unicode_ci No y Change Change Drop Drop More Show more actions
    37 avail_to int(10) No 0 Change Change Drop Drop More Show more actions
    38 manufacturer int(11) No 0 Change Change Drop Drop More Show more actions
    39 vendor int(11) No 0 Change Change Drop Drop More Show more actions
    40 part_number varchar(255) utf8_unicode_ci No None Change Change Drop Drop More Show more actions
    41 sku varchar(150) utf8_unicode_ci No Change Change Drop Drop More Show more actions
    42 base_sku varchar(150) utf8_unicode_ci No None Change Change Drop Drop More Show more actions
    43 LegacyID varchar(255) utf8_unicode_ci No None Change Change Drop Drop More Show more actions
    44 LegacyURL varchar(255) utf8_unicode_ci No None Change Change Drop Drop More Show more actions
    45 LegacyLOP decimal(7,2) No 0.00 Change Change Drop Drop More Show more actions
    46 LegacyLSP decimal(7,2) No 0.00 Change Change Drop Drop More Show more actions
    47 LegacyGift varchar(255) utf8_unicode_ci No None


    read table #1 by itemno.
    then read the corresponding record in table #2 by LegacyID - itemno and LegacyID should be exact.
    then update price in table 2 to be the retail-price in table 1.....
    update wholesale_price in table 2 should be the wholesale-price in table 1
    then multiple sale_price in table 2 by 0.95
    update table 2

    and you're done..

    database is called honor_sunshop - dbuser is tony and dbpass is 1234
     
    tyankee, Aug 18, 2012 IP
  4. edduvs

    edduvs Well-Known Member

    Messages:
    394
    Likes Received:
    31
    Best Answers:
    3
    Trophy Points:
    160
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #4
    Well I can do that simply, but since I'm within limited feedback I suppose I can't.
     
    edduvs, Aug 19, 2012 IP