FAQ
Hi

I need to update the 'products_id' field (shown below) by copying data from
a separate table but I can't use the 'UPDATE' query as each 'product_id'
entry relates to a specific 'products_model' row.

id / assembly_no / products_id / products_model
1 / 2313 / *** / CASEACERENTRY2
2 / 2313 / *** / 9145S05001

I've tried using the 'UPDATE' query but as the 'LIMIT' function doesn't work
with 'UPDATE' every time I run the query it updates every row with the same
'products_id' information!

Please can somebody help???

P.S. I'm running MySQL 4.0.26 using phpMyAdmin

Search Discussions

  • Gleb Paharenko at Dec 15, 2005 at 5:53 pm
    Hello.

    Please, could you provide the CREATE statement for you tables
    and describe the relationships between their fields (it will
    be good if you include sample data as well).



    Matthew Batt wrote:
    Hi

    I need to update the 'products_id' field (shown below) by copying data
    from a separate table but I can't use the 'UPDATE' query as each
    'product_id' entry relates to a specific 'products_model' row.

    id / assembly_no / products_id / products_model
    1 / 2313 / *** / CASEACERENTRY2
    2 / 2313 / *** / 9145S05001

    I've tried using the 'UPDATE' query but as the 'LIMIT' function doesn't
    work with 'UPDATE' every time I run the query it updates every row with
    the same 'products_id' information!

    Please can somebody help???

    P.S. I'm running MySQL 4.0.26 using phpMyAdmin


    --
    For technical support contracts, goto https://order.mysql.com/?ref=ensita
    This email is sponsored by Ensita.NET http://www.ensita.net/
    __ ___ ___ ____ __
    / |/ /_ __/ __/ __ \/ / Gleb Paharenko
    / /|_/ / // /\ \/ /_/ / /__ gleb.paharenko@ensita.net
    /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
    <___/ www.mysql.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedDec 15, '05 at 1:25p
activeDec 15, '05 at 5:53p
posts2
users2
websitemysql.com
irc#mysql

2 users in discussion

Matthew Batt: 1 post Gleb Paharenko: 1 post

People

Translate

site design / logo © 2021 Grokbase