Jump to content

php/mysql update script


pugs1501

Recommended Posts

I have used a couple of complete scripts where they have a config table that each row is a variable and then it hs a value to and i was wondering how to editthe table as a whole. Where i could make a admin page where a admin can change any or all of the varibles and click submit and they would be updated automatically. Thank you for your responses Hopfulyl some one can help.
Link to comment
https://forums.phpfreaks.com/topic/9111-phpmysql-update-script/
Share on other sites

I think what you are saying is that you want to be able to edit all of the values from the admin table and update them all together. And the 'config' table has two columns. A 'property' and a 'value'.

The only way that I can think of to update a table like this is to update each value separately. At least that's the only simple way to do it. I'm not saying it can't be done, I just can't think of a more simple way.

An easier way to do this would be to make just one row in the 'config' table and make the column titles the property and the first row table cell the value. This way you'll be able to pull them all out by one query and update them all with one query.

Hope this helps...

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
Link to comment
https://forums.phpfreaks.com/topic/9111-phpmysql-update-script/#findComment-33508
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.