faustf Posted August 10, 2018 Share Posted August 10, 2018 hi guys i have a csv , i attached , i have create a script for insert inside of db expandcollapse popup_main() Func _main() Local $hTimer = TimerInit() Local $aLListinoComp = FileReadToArray(@ScriptDir & "\WEB-SITE\CGross\xls\listino.csv") ; listino completo If @error Then MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file. EndIf ;_ArrayDisplay($aLListinoComp) For $i = 0 To UBound($aLListinoComp) - 1 Local $aLPart = StringSplit($aLListinoComp[$i], ';') #cs Local $sStrippedString = StringStripCR($aLListinoComp[3]) If $sStrippedString = "Prezzo Listino" Then MsgBox(0, '', 'de made ') EndIf #ce If $aLListinoComp[3] = "Prezzo Listino" Then ElseIf $aLListinoComp[3] = "" Then Else _ArrayDisplay($aLPart) Local $sLSyntax = "INSERT INTO ge_CGross_listino (codice,DescProd,Produttore,DescCatMerc,Dispo,PrezzoSiSconto,Grossista)" & _ " VALUES ('" & $aLListinoComp[1] & "','" & $aLListinoComp[2] & "','" & $aLListinoComp[8] & "','" & $aLListinoComp[9] & "','" & $aLListinoComp[6] & "','" & $aLListinoComp[5] & "', 'CompGross' )" Local $sLQueryResult = _Mysql_Query($sLSyntax) If @error Then SetError(@error, @extended, $ADO_RET_FAILURE) EndIf EndIf Next Local $fDiff = TimerDiff($hTimer) ; Find the difference in time from the previous call of TimerInit. The variable we stored the TimerInit handlem is passed as the "handle" to TimerDiff. ConsoleWrite("Time Difference= " & $fDiff) MsgBox($MB_SYSTEMMODAL, "Time Difference", $fDiff) endfunc the problem always popup _arraydisplay($aLPart) also when inside of $aLListinoComp[3] = "Prezzo Listino" , why do this ??? listino2.csv Link to comment Share on other sites More sharing options...
faustf Posted August 10, 2018 Author Share Posted August 10, 2018 sorry i find a solution i invert a array sorry Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now