• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

AS3 datagrid and php refresh

Hey Team:

I have a flash datagrid that populates information from a mysql database using php.

The problem:
Everything loads correctly but I am having a problem with refreshing the datagrid without having to exit the website and logging back in. The function calls the php script and is attached to a button. Each time the button is clicked the php script is activated and the datagrid should update...but is not. Instead, the datagrid refreshes without the updates.

Question:
What are the possible solutions? maybe a cache problem?

Thanks for the help
0
eager_to_learn
Asked:
eager_to_learn
  • 3
  • 3
1 Solution
 
deepanjandasCommented:
yes, might be a cache problem.
So every time you cal the php, concat a random number or timestamp as querystring to the url, like this:
http://www.website.com/php/myservice.php?r=6556487987

Warm Regards
Deepanjan Das
0
 
eager_to_learnAuthor Commented:
Sounds like a possible solution. How and where am I writing the code to concat the random timestamp?
0
 
deepanjandasCommented:
The place where you are calling the php url from within flash

Warm Regards
Deepanjan Das
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
eager_to_learnAuthor Commented:
Is there an example available? maybe a link to a tutorial?
0
 
deepanjandasCommented:
if you can share your piece of code within flash, that would be easier to suggest.

Warm Regards
Deepanjan Das
0
 
eager_to_learnAuthor Commented:
Hey deepanjandas;

Thanks for leading me in the right direction. Below is the code that is now working. Problem solved!

//Renames the script file everytime its called
var URL_ur:URLRequest = new URLRequest(file.php + "?r=" + new Date().getTime());
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now