Reputation: 51
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.
Upvotes: 3
Views: 7185
Reputation: 234
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);
Upvotes: 1
Reputation: 3121
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.
Upvotes: 4