dprichard Posted November 5, 2007 Share Posted November 5, 2007 I am setting up a site I want to use for a few clients. I want to be able to edit the verbiage in a table and it update the language everywhere it is used sitewide. I setup a table like this: langid langname langecho langstatus I have the langid as the primary key with autoincrement on. The name is what I use to identify it, then the langecho is the actual verbiage and the langstatus is what is going I was going to use to say this is a top menu button, a left menu button, etc. I have it as an int and have another table that stores what each int is for. What I would like to be able to do is query the table for the top menu include and pull out just the top menu items. $buttonlang = mysql_query("SELECT langname, langecho from language WHERE langstatus = 1") or die(mysql_error()); $return mysql_fetch_assoc($buttonlang); Then in the page, assign the langecho to the variable for whatever is in the langname field so $langname = $buttonlang['langecho'] and repeat it for all results so that the variable for langname has the value of the lang echo. I hope this makes sense. Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/76067-storing-site-verbiage-in-a-table/ Share on other sites More sharing options...
dprichard Posted November 5, 2007 Author Share Posted November 5, 2007 Bump... Anyone? Link to comment https://forums.phpfreaks.com/topic/76067-storing-site-verbiage-in-a-table/#findComment-385074 Share on other sites More sharing options...
Psycho Posted November 5, 2007 Share Posted November 5, 2007 You didn't ask a question and doing a 'bump' after about an hour is not appropriate. What EXACTLY is your problem? Link to comment https://forums.phpfreaks.com/topic/76067-storing-site-verbiage-in-a-table/#findComment-385085 Share on other sites More sharing options...
dprichard Posted November 5, 2007 Author Share Posted November 5, 2007 Sorry, I saw my post floating down the page and was worried it wouldn't get a reply. Thank you for the pointing the disproportionate actions on my part. I will try to give it a little more time in the future before bumping one of my posts. I am trying to figure out how to assign the results from the langecho table to a variable named the results from the langname table so I can just echo out the langname and it show the informaiton from the langecho column. Link to comment https://forums.phpfreaks.com/topic/76067-storing-site-verbiage-in-a-table/#findComment-385096 Share on other sites More sharing options...
Psycho Posted November 5, 2007 Share Posted November 5, 2007 <?php $query = "SELECT langname, langecho from language WHERE langstatus = 1"; $result = mysql_query($query) or die(mysql_error()); while ($record = mysql_fetch_assoc($result)) { $language[$record['langname']] = $record['langecho']; } ?> Link to comment https://forums.phpfreaks.com/topic/76067-storing-site-verbiage-in-a-table/#findComment-385110 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.