Jump to content

Recommended Posts

Posted (edited)

RESOLVED

I want to make a list who refresh every time I press a key

for that i want to delete a list content for that new values take place

/RESOLVED

NEW PROBLEM:

And how to detect a key is pressed event in a input? Now i have

$cuvantcauta=GUICtrlCreateInput("", 32, 24, 385, 21)
GUICtrlSetOnEvent(-1, "pcauta")

but when i type a search and when I select another input start pcauta()

I want to start pcauta() every time a tst is pressed in input $cuvantcauta

this is the function

Func pcauta()
     Local $user, $pass, $db, $server, $connect, $niciuncod = 1
    Local $query, $continut, $xcod[10000], $xnume[10000], $xpv[10000], $xstoc[10000], $x
    Local $ccauta

???????????RESET LIST????_GUICtrlListBox_DeleteString($Listaproduse, 1)????????????????

    $ccauta = GUICtrlRead($cuvantcauta)
    $user = "root"
    $pass = "xxx"
    $db = "xxx"
    $server = "xxx"
    $connect = _MySQLConnect ($user, $pass, $db, $server)
    $query = "SELECT * FROM magazies WHERE CODBAR like '%" & $ccauta & "%'"
    $continut = _Query ($connect, $query)
    With $continut
        If .EOF Then
            $niciuncod = 0;
        EndIf
    EndWith
    If $niciuncod > 0 Then
        $x=0
        With $continut
            While Not .EOF
                $xcod[$x] = .Fields ("CODBAR").value
                $xnume[$x] = .Fields ("Articol").value
                $xpv[$x] = .Fields ("pv").value
                $xstoc[$x] = .Fields ("pv").value
                $x=$x+1;
                $lastx=$x
                .MoveNext
            WEnd
        EndWith
        _MySQLEnd ($connect)
    for $x=0 to $lastx step 1
     GUICtrlCreateListViewItem('' & $xcod[$x] & '|' & $xnume[$x] & '|' & $xpv[$x] & '|' & $xstoc[$x] & '', $Listaproduse)
 Next
    EndIf
EndFunc
Edited by ShadowElf

I like IT: php, mysql, codeingiter, css, jquery and AUTOIT

Posted (edited)

thx, and how to detect a key is pressen on event? as the user types data to call function pcauta()

Edited by ShadowElf

I like IT: php, mysql, codeingiter, css, jquery and AUTOIT

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...