Listview data update - if array is changed

Recommended Posts

rony2006 0

rony2006 0

I have a script were I have a GUI with a listview. The data from listview is from an 2D array (a table from mysql query).

When I start the script, I want to have the listview with the 2D array and then to check each 2 sec if the table if change then to also change the data from listview. If the data from table is the same with the data from listview, then do nothing.

I tried all sort of things but I cannot get the script working as I want.

What you see with ; is what I tried to do. First I thought that is good to compare the data that was sent to listview with a new SQL query. If the value of array is the same, then do nothing, else send the new data to the listview.

With the script from above, the data from listview is deleted each 1,5 sec and new data is added. (no matter if is the same).

Any ideas how I can update the data from the listview ONLY if the data from mysql is changed?

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area