3

When I Run update or select query within phpmyadmin local page, I get table results pop up with the "GO" button. But for using *.php file from a server I have to use refresh button to see the newly incoming data on my table, create view didn't help, or I may be missing something. How can I view them like an auto refresh/update style! any help?

while (($data = fgetcsv($handle, 1000)) !== FALSE) {
 $sql2 = "INSERT INTO `tabl_nam` (
 `col_1` ,
 `col_2`
 )
 VALUES ('" . $data[0]. "', '" . $data[1] . "')";
 }
mysqli_query($link,$sql2);
$sql1 = "UPDATE `tabl_nam` SET `col_1`= '" . $data[0]. "',`col_2`='" . $data[1]. "'";
//$sql1 = "SELECT `col_1`, `col_2` FROM `Cr_view` WHERE 1"; 
//"Cr_view" is my create view table on phpmyadmin
//$sql1 = "SELECT `col_1`, `col_2` FROM `Cr_view` WHERE 1";//I tried 'SELECT' query as well 
mysqli_query($link,$sql1);
mysqli_close($link); 
//both the above select and update queries worked on phpmyadmin console 

If not PhpMyAdmin, is there any solution (S.W or code or query)for auto updating the view when uploading a new data for at least a single table.

asked Aug 23, 2014 at 23:33
1
  • 1
    Because phpMyAdmin uses AJAX/JQuery requests to pull the data without having to refresh the page, here is an example stackoverflow.com/questions/22643644/… Commented Aug 23, 2014 at 23:43

2 Answers 2

4

Create a bookmark with this "address":

javascript:setInterval(function() { $('a:contains("Refresh")').click(); }, 10000);

After opening the phpMyAdmin, click on this bookmark (or run this snippet directly from URL bar) and from now, tables will be auro-refreshed every 10 seconds.

answered Sep 4, 2015 at 9:24
Sign up to request clarification or add additional context in comments.

2 Comments

I added it as Tempermonkey script to make it .
my Tempermonkey version gist.github.com/senpl/… for german version but could be changed to Refresh.
1

If the above bookmarklet doesn't work try this one. It fixes the browser navigating to a page instead of clicking the Refresh link (at least in Firefox).

javascript:var _x=setInterval(function(){$('a:contains("Refresh")').click();},10000);
answered Sep 12, 2016 at 21:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.