Jump to content


Photo

php/mysql update script


  • Please log in to reply
2 replies to this topic

#1 pugs1501

pugs1501
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 05 May 2006 - 08:04 AM

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.

#2 jeremywesselman

jeremywesselman
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts
  • LocationIndependence, KY

Posted 05 May 2006 - 08:18 AM

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--]

#3 pugs1501

pugs1501
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 10 May 2006 - 05:57 PM

thank you for the quick respone and i will set it up that way.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users