Welcome Guest, Not a member yet? Register   Sign In
Store data data from multiple fields
#6

[eluser]Lykos22[/eluser]
Actually I add/edit the values of the feature.

Well what I've done so far is I get all features of a saved product, depend on the category the product belongs to (computers have different features than digital cameras). You can also review it here. So when I get the correct features, I can asign them some values, either adding or edititng them.

[quote author="Mangetsu" date="1381572305"]Update gets a bit complicated..Especially if you change feature number, ie. remove one of existing features. I usually do such things by getting all existing features of saved product, check in array if feature exists, if does I do update and remove it from that array. If doesn't I do insert. Remaining features in array are features that exist in DB but not in new data, so i remove them from DB. There's probably better way of doing it, I tend to complicate sometimes, but it's how I've done it in several cases. [/quote]
Could you give me a simple example? I'm not quite sure


Messages In This Thread
Store data data from multiple fields - by El Forum - 10-10-2013, 04:47 AM
Store data data from multiple fields - by El Forum - 10-10-2013, 09:17 AM
Store data data from multiple fields - by El Forum - 10-11-2013, 02:27 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 02:00 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 03:05 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 03:31 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 04:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB