Hi all,
I have an array and I need to send all values trough an SQL update.
I now use the following:
Func _upload($index)
If Not _EzMySql_Startup() Then
_status(1, "Unable to Connect")
EndIf
If Not _EzMySql_Open("myserver", "username", "pw", "db", "port") Then
_status(1, "Unable to Connect")
Else
For $i = 0 To UBound($csv_list) - 1
if $csv_list[$i][5] > 0 Then
$query = "INSERT INTO `My_Table` (`id`,`name`, `data`,`object`, `ind`,`open`,`total`,`h1`,`h2`) VALUES ('', '" & $index & "', '" & $csv_list[$i][0] & "', '" & $csv_list[$i][1] & "', '" & $csv_list[$i][2] & "', '" & $csv_list[$i][3] & "', '" & $csv_list[$i][4] & "', '" & $csv_list[$i][5] & "', '" & $csv_list[$i][6] & "')"
$res = _EzMySql_Exec($query)
If @error Then
MsgBox(0, "1", _EzMySql_ErrMsg())
Else
EndIf
EndIf
Next
_status(2,"Updated")
_EzMySql_Close()
_EzMySql_ShutDown()
EndIf
EndFunc ;==>_upload
This take time since I have to cycle all the lines of the array (it can be 1-50,000 lines)
Is there a way to send the whole array trough the query?
Thanks,
Marco