For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > November 2004 > [maybe minor ot] cache probs.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [maybe minor ot] cache probs.
Bobo Wieland

2004-11-26, 4:08 pm

i'm sorry _if_ this is ot...

i use php to communicate between flash and mysql...
in internet explorer (not in Opera or fire fox, where eveything works ok)
something goes wrong and flash recives old data that doesn't exist
anymore...
the php page that loads the flash movie displays the correct updated info,
but the php function (in another file) that gets called from flash displayes
old info that doesn't exist anymore...
this is the php function that returns the wrong info:

<code>
function fetchImgUrl() {
global $link_id;
$question = "SELECT path, filename FROM img_tmp WHERE id = 'sortment'";
$result = mysql_query($question, $link_id);
if ($result) {
$img = mysql_fetch_object($result);
if (file_exists("./../img/sort/".$img->filename)) { $rtnVal =
"&error=0&path=".$img->path."&file=".$img->filename; }
else { $rtnVal = "&error=3&arg=".htmlentities("The file
".$img->path.$img->filename." does not exist"); }
} else { $rtnVal = "&error=2"; }
return $rtnVal;
}
</code>

explaination of the code: the mysql table "img_tmp" never holds more than
one row... this row allways have the id "sortment" (this is because if i
decide to expand the functionality in the future).[color=darkred]
Now this is really strange... flash recives this info:
"&error=0&path=./../img/sort/path&file=<old file name that doesn't exist
anymore>" this filename points to a file that doesn't exist on the server so
why does the if-statement evaluate to true?!?


any ideas?


_bobo wieland _ dev@elstudion.com _
winamp >> jeans team feat. mc lan | keine melodien
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com