Re: [PHP-DB] Realtime connection to postgres database

2020-11-09 Thread Karl DeSaulniers
Is this what you are looking for?

https://www.postgresql.org/docs/9.6/monitoring-stats.html 


or maybe this?

https://github.com/supabase/realtime 


Google Foo:  real-time connection to postgresql database (v9.6)

HTH,

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com 




> On Nov 9, 2020, at 11:41 PM, Rodrigo Sánchez  wrote:
> 
> connected to  postgresql
> database (v9.6)



Re: [PHP-DB] Realtime connection to postgres database

2020-10-26 Thread Karl DeSaulniers
Sounds like a good cron job candidate. 

Best,
Karl

Sent from losPhone

> On Oct 25, 2020, at 4:43 PM, Aziz Saleh  wrote:
> 
> Another way to do this is to have an ajax call on timeout to an update
> endpoint, if there is an update inject that update on the page (or refresh
> it).
> 
> Some js examples (both short/long polling):
> 
> https://stackoverflow.com/questions/42825972/update-html-when-change-is-noticed-in-mysql-database
> https://stackoverflow.com/questions/22577457/update-data-on-a-page-without-refreshing
> https://stackoverflow.com/questions/8100594/refresh-content-automatically-if-the-database-changes
> 
> 
>> On Sun, Oct 25, 2020 at 5:18 PM Rodrigo Sánchez 
>> wrote:
>> 
>> Hi everyone,
>> 
>>  I made a table in html that reads a table from a postgres database
>> (easy part).  The postgres database grows every time an earthquake
>> occurs. What is the best way to keep the table updated automatically,
>> each time a new earthquake is added to the database? (I mean, not having
>> to update by clicking on the browser). The ugly way to do it is by using
>> something like header ("refresh: 3"); for example ... but isn't there
>> something better?
>> 
>>  Excuse the question if it is very obvious, but I am not a "full" time
>> php programmer.
>> 
>>  (PHP 7.4.11, postgresql 9.6.19)
>> 
>> 
>> --
>> 
>>  Rodrigo Sánchez-Olavarría
>>  CSN, Centro Sismologico Nacional
>>  Universidad de Chile
>>  Celular : +56 9 42137243
>> 
>> 
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Realtime connection to postgres database

2020-10-25 Thread Aziz Saleh
Another way to do this is to have an ajax call on timeout to an update
endpoint, if there is an update inject that update on the page (or refresh
it).

Some js examples (both short/long polling):

https://stackoverflow.com/questions/42825972/update-html-when-change-is-noticed-in-mysql-database
https://stackoverflow.com/questions/22577457/update-data-on-a-page-without-refreshing
https://stackoverflow.com/questions/8100594/refresh-content-automatically-if-the-database-changes


On Sun, Oct 25, 2020 at 5:18 PM Rodrigo Sánchez 
wrote:

> Hi everyone,
>
>   I made a table in html that reads a table from a postgres database
> (easy part).  The postgres database grows every time an earthquake
> occurs. What is the best way to keep the table updated automatically,
> each time a new earthquake is added to the database? (I mean, not having
> to update by clicking on the browser). The ugly way to do it is by using
> something like header ("refresh: 3"); for example ... but isn't there
> something better?
>
>   Excuse the question if it is very obvious, but I am not a "full" time
> php programmer.
>
>   (PHP 7.4.11, postgresql 9.6.19)
>
>
> --
> 
>   Rodrigo Sánchez-Olavarría
>   CSN, Centro Sismologico Nacional
>   Universidad de Chile
>   Celular : +56 9 42137243
> 
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>