PDA

View Full Version : php and PUSH technology


davidj
02-17-2006, 12:16 PM
ok people its time to give DJ a hand

if you can help i will give you a status of super human and will send a badge which you can wear on your speedos

PHP... Can you incorporate push technology into PHP?

let me explain..
i have an application used by a few hundred people which is divided on login into groups of 10's. If user 1 clicks a record to amend then all other users will get a LOCKED record (read only) but only when the page is refreshed or they click on the same record will they get this warning.

this is shite and needs some bling. Ideally i would like the records to update dynamically so when user 1 locks a record then all users should see this locked icon appear instantly without the need to refresh.
this is obviously going against how the web works but i was thinking down the lines of PUSH technology where servers push email through to phones and PDA's

any ideas

domedia
02-17-2006, 01:59 PM
Use sessions and a new field 'locked'?

davidj
02-17-2006, 02:39 PM
Use sessions and a new field 'locked'?


give me some credit ove (easy peasy)
thats what i have done but let me draw you a mind image...

senario
you have logged on and are amending record 1....
i have already logged on before you and i am viewing the same data (recordset loop) but have not refreshed.
at this point i dont know you are working on record 1 even though i am viewing the same data (recordset loop) unless i refresh and read the lock table column and look for lock marker

unless i click your record (which is locked) i dont get an indication that you are working on that record

if you take into consideration that 50 people could be working on the same data i could click a few times before i get a record that is open for edit

do you understand my thought pattern... (vulcan thing)

Creative Insanity
02-17-2006, 06:53 PM
Would this (http://nz.php.net/manual/en/function.array-push.php) do it dj?

domedia
02-17-2006, 08:17 PM
davidj, if you haven't gotten in AJAX yet, now is the time lol.
Have JS run a little php script that checks to see if the record has been changed, and if it has it will grab the new data and display in your element/box/container watevayacallit (getElementById).

davidj
02-20-2006, 09:03 AM
Would this do it dj?


thats an array function CI... Nowt to do with my query