We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


How do I get an update I made to a record in my database show up on the Web page?

Medium Priority
Last Modified: 2012-05-11
Our company hosts their intranet on an in-house server. I just updated a database record in phpmyadmin but the change is not showing up when I refresh my browser. How do I refresh the files to make the change show up? Its important to note that in another database table on our intranet, whenever I make a database change I click a link which activates a script which refreshes the data. However in the database record I just updated it is not connected to the same refresh script. Is there another way for me to refresh the database record I just updated?
Watch Question

Most Valuable Expert 2011
Author of the Year 2014
Unlock this solution and get a sample of our free trial.
(No credit card required)


Thanks Ray. I think since other tables have a script that was created which refreshes the records means that the table I'm working on needs one too. Unless their is a manual way for me to update it. I'm pretty sure I have updated the right table. And the paths are correct as all i changed was a price of a record that was already in place on the web site. I don't think its a browser caching issue as i empty my browser cache and hit ctrl + refresh and the old price of the record is still there. So do you now how I would go about fixing if the servers are caching the new data?
Most Valuable Expert 2011
Author of the Year 2014

Do you have a server admin there?  If so ask her about it.  It's the sort of thing that might have come up before.
Do you know if the page that you're browsing is actually pulling data from the table where you updated the record? Sometimes there are several tables involved and there may be additional tables where the data has not been updated. Hence the need for a script to "refresh" the data.


Anuar, I think there are several tables as you suggest. The page itself has this link: <a href="fencing.php?PRODUCTTYPE=Fence Toppers"><Strong>Fence Toppers</Strong>

When someone clicks on Fence Toppers, all the fence toppers products from the database show up in a list at the bottom of the page. The "fence toppers" is a record entry in a table called "item_extension". However the prices (which is what i'm trying to update in my pages) for the all fence topper products are located in a table called "products".

The page code of the a href tag above accesses the item_extension table but I can't find anywhere else on the page or other linked pages off that page that has code telling the table "item_extension" to get its price from the table "products". Yet it must because there is no other table where the price is listed.

Do I need to add a refresh script to get the price change to update on the page? If so, do you know of any ready-made scripts I can use? Thank you.
Most Valuable Expert 2011
Author of the Year 2014

any ready-made scripts I can use?

Some questions come to mind... Who developed the web site?  Can you get them to show you how they joined the tables?  Can you determine if it was developed in a standard shopping cart (most of them provide ways to change prices)?  Can you post a URL link to the web pages in question along with the source code and the CREATE TABLE statements.  Any of those answers will be helpful as you try to reduce this question to something that can have an answer that represents a solution instead of a speculation.


Ray, I realize its tough to come up with an answer when you don't have all the info. sorry for that. I've attached the main page code below.

$varredarrow='<img src="../../graphics/redarrow.jpg" width="15" height="8" border="0">&nbsp;&nbsp;&nbsp;';
$varwhitearrow='<img src="../../graphics/whitearrow.jpg" width="15" height="8" border="0">&nbsp;&nbsp;&nbsp;';

if ($producttype=='Cedar Board on Board Panels')
if ($producttype=='Cedar Solid Panels')
if ($producttype=='Cedar Spaced Picket Panels')
if ($producttype=='Curved Top Cedar Solid Panels')
if ($producttype=='Good Neighbor Fence Panels')
if ($producttype=='Cedar Arbors')
if ($producttype=='Fence Toppers')
if ($producttype=='Vinyl Arbors')
if ($producttype=='Vinyl Gates')
if ($producttype=='Vinyl Privacy Panels')
if ($producttype=='Vinyl Semi Privacy Panels')
if ($producttype=='Vinyl Victorian Square Picket')
if ($producttype=='Vinyl Through The Rail Spaced Picket')
if ($producttype=='Vinyl Traditional Spaced Picket')
if ($producttype=='Vinyl Post Caps And Hardware')
echo '<table width=650 class=qb border="0"><tr align=middle ><td valign=top>';
	echo '<table class=qb border="0"><tr>';
	echo '<tr><td width=15 align=right valign=top>'.$cobbp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Cedar Board on Board Panels"><Strong>Cedar Board on Board Panels</Strong></a></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$ctcsp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Curved Top Cedar Solid Panels"><Strong>Curved Top Cedar Solid Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$ca.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Cedar Arbors"><Strong>Cedar Arbors</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vpp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Privacy Panels"><Strong>Vinyl Privacy Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vttrsp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Through The Rail Spaced Picket"><Strong>Vinyl Through The Rail Spaced Picket</Strong></td></tr>';
	echo '</table>';
echo '</td>';
echo '<td valign=top>';
	echo '<table class=qb border="0"><tr>';
	echo '<tr><td width=15 align=right valign=top>'.$csp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Cedar Solid Panels"><Strong>Cedar Solid Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$ft.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Fence Toppers"><Strong>Fence Toppers</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vg.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Gates"><Strong>Vinyl Gates</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vspp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Semi Privacy Panels"><Strong>Vinyl Semi Privacy Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vtsp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Traditional Spaced Picket"><Strong>Vinyl Traditional Spaced Picket</Strong></td></tr>';
	echo '</table>';
echo '</td>';
echo '<td valign=top>';
	echo '<table class=qb border="0"><tr>';
	echo '<tr><td width=15 align=right valign=top>'.$cspp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Cedar Spaced Picket Panels"><Strong>Cedar Spaced Picket Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$gnfp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Good Neighbor Fence Panels"><Strong>Good Neighbor Fence Panels</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$va.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Arbors"><Strong>Vinyl Arbors</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vvsp.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Victorian Square Picket"><Strong>Vinyl Victorian Square Picket</Strong></td></tr>';
	echo '<tr><td width=15 align=right valign=top>'.$vpch.'</td> <td ><a href="fencing.php?PRODUCTTYPE=Vinyl Post Caps And Hardware"><Strong>Vinyl Post Caps And Hardware</Strong></td></tr>';
	echo '</table>';
echo '</td></tr></table>';

//$path='fencing/Cedar Board on Board  Panels1_files/'; 
$query = "select item_extension.sort, item_extension.number, item_extension.size, item_extension.page, 
item_extension.code, item_extension.pic, item.item_desc as descript, item_extension.descript2, item_extension.descript3, keywordgroup.keywords, 
item_extension.link, item_extension.type, item_extension.length, item_extension.sellprice, format(inventory.inv_price2,2) 
as inv_price2, item.item_pum from item_extension 
left join keywordgroup on item_extension.item_id=keywordgroup.item_id 
left join item on item_extension.code=item.item_cd 
left join inventory on item.item_id=inventory.item_id and item_extension.loc_id=inventory.loc_id  
where item_extension.type='$producttype' order by  item_extension.sort, item_extension.descript2, item_extension.size";

echo '<BR>';

if ($producttype!='')
echo '<br />Email <a href="mailto:zzz@bbb.com">Rick EXT. 7516</a> or <a href="mailto:aaa@bbb.com">Jim EXT. 7502</a> with further questions.';


Open in new window


Ray, below is another page of code linked off the main page code I just sent you. What happens is the code above lists types of products on a page. When someone clicks on the link of a product it opens up to a list of items under that product but still on the same page. That sublist is activated by the code below and is where the price point is that i'm trying to update. I am not sure as to how the price point which is found in the table "products" is tied to the related table "item_extension".
//--------------------------------------Fixed width columns
//	$nwidth='50';	//number width
//	$dwidth='180'; //description width
//	$swidth='120';	//size width
//	$cwidth='30';	//code width
//	$twidth='50';	//type width

//--------------------------------------Variable width columns

	$nwidth='10';	//number or page width
	$dwidth='350'; //description width
	$swidth='50';	//size width
	$cwidth='40';	//code width
	$twidth='10';	//type width
	$pwidth='30';	//price width
	$lwidth='0';	//length width
	$pumwidth='60';	//pum width
	$pagenumwidth='60';	//page & number width
	$ttblwidth='350';	//top line table width width
	$btblwidth='350';	//bottom line table width width
	$spacewidth='20';	//bottom line table width width
	$keywordswidth='0';	//pum width

	$result = mysql_query($query);
	$num_results = mysql_num_rows($result);
	//echo '<H4>'.$producttype.'</H4>';
 	if (($num_results==0) &&($producttype!=''))
		echo 'No items found...<BR>';
		//echo $num_results.' items found...';
		echo '<TABLE class=qb >';
		for ($i=0; $i <$num_results; $i++)
				$row = mysql_fetch_array($result);
				if ($number=='')
				if (($page=='') ||($page==0))
				if (($code!='')&&($code!='KIT'))
				else if ($code=='')
					$item_pum='<FONT COLOR=RED>Spec Order</FONT>';
				else if ($code=='KIT')
					$item_pum='<FONT COLOR=RED>Parts in Stock</FONT>';

		if (($pic!=$priorpic) && ($priorpic=='')) //if pic changes and prior pic is null (beginning of report)------------------------------
			echo '<TR><TD>	<H4>'.$producttype.'</H4><TABLE width="'.$ttblwidth.'" class=qb>';
			echo '<TR>';
		elseif (($pic!=$priorpic) && ($priorpic!=''))//if pic changes and prior pic is NOT null------------------------------
			echo '</TABLE></td><TD valign=top><img src="'.$path.$priorpic.'"></td></TR>';
			echo '<tr>';
			echo '<td>&nbsp;</td>';
			echo '</tr><TR>';
			echo '<TD>	<H4>'.$producttype.'</H4><TABLE width="'.$ttblwidth.'" class=qb>';
			echo '<TR>';
		else //otherwise------------------------------------------------------------------------------------------
			echo '<TABLE width="'.$ttblwidth.'" class=qb><TR>';

		} //end of for loop
			if ($producttype!='')
				echo '</TABLE></td><TD valign=top><img src="'.$path.$priorpic.'"></td></TR>';
		echo '</TABLE>';
	} //end of else

Open in new window


Ray, I've also attached a snapshot of the database tables that are used for this. I have access to phpmyadmin. Can that be used to show you how the tables are joined?
Most Valuable Expert 2011
Author of the Year 2014

I wonder if there is another table somewhere?  Maybe a junction table that joins these two tables in a many-to-many relationship?  Or maybe item_extension.code = products.sku?


Can we assume that the tables are joined and that I need a refresh script to update the data on the web page itself? Is there a script I can download?


Ray, it appears that your suggestion that i altered the wrong table was right after all. My boss helped me to search through to the correct table.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.