View Full Version : php and PUSH technology

02-17-2006, 11:16 AM
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

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

02-17-2006, 01: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...

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, 05:53 PM
Would this (http://nz.php.net/manual/en/function.array-push.php) do it dj?

02-17-2006, 07: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).

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

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