Jump to content

Need help writing this one...


AV1611

Recommended Posts

Need some suggestion on how to write this script... (PHP/MySQL)

let me describe the table:

(field names - example)

partnumber - 1122.123
compliant - YES
mfg1 - AMD
mfg1pn - 74hc123
compliant1 - n
mfg2 - AMD
mfg2pn - 74hc123
compliant2 - y
mfg3 - AMD
mfg3pn - 74hc123
compliant3 - n

there is a second table called archives

partnumber - 2222.123
mfg - AVX
mfgpn - 1N123
compliant - n

----------------

OK,

what the script needs to do is first select all the records that have compliant = YES

then it needs to move all mfgx/mfgpnx/compliantx triplets to the archive table IF the compliantx=n

so,

when it is finished, all records where compliant = YES have ONLY compliant mfgx/mfgxpn/compliantx=y
AND
all records that have compliant != YES have no change.

sounds easy, until you go to write it...


You should know the tables above are simplified, actually, there are 5 triplets per record, and about 30 fields, but I can sort all that out...

Thanks
Link to comment
https://forums.phpfreaks.com/topic/10866-need-help-writing-this-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.