You are here: Does PHP "cache" scripts? « PHP Programming Language « IT news, forums, messages
Does PHP "cache" scripts?

Posted by StevePBurgess on 09/14/06 20:41

A really simple script is driving me up the wall.

I have a very simply facility on a website to allow the user to reorder
items in a database table as she wishes by clicking a link that (in
this case) says "MOVE UP" and links to the script below.

This script snippet that does all the work is shown - the database
connection is established and after doing its work the script returns
the user to the referring page.

---------------------------------------------
$sql="select DisplayOrder from CreditType where Id=" . $credcat;
$result=mysql_query($sql);
$row=mysql_fetch_row($result);

$sql="update CreditType set DisplayOrder=" . (($row[0])-1) . " where
Id=" . $credcat;

mysql_query($sql);

$sql="update CreditType set DisplayOrder=" . ($row[0]) ." where
DisplayOrder=" . (($row[0])-1) . " and Id<>" . $credcat;

mysql_query($sql);
--------------------------------------------

On my own server this works perfectly - but when I upload it to my
client's shared server it sometimes works and sometimes doesn't. It is
intermittent.

Could PHP be returning a cached result of the script? If no, what on
earth can be happening? If yes, can I stop this from happning from the
script (I can't change any settings on the shared host).

Many thanks.
Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация