View Single Post
Old 11-16-2012, 05:26 PM   PM User | #17
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
Quote:
Originally Posted by Fou-Lu View Post
I don't believe that MySQL tracks a rejection option for an insert ignore. What you can do is pull the number that was successful after the result:
PHP Code:
$iSuccessful += mysql_affected_rows($result); 
And initialize $iSuccessful to 0 before the while loop, and you can compare the $iSuccessful to the $counter. $counter should represent the total number of records, while $iSuccessful should indicate the number inserted.
You should consider blocking the query into sets of even 10 entries at a time to save the query counts. Depending on the datasize you could potentially get away with hundreds of entries per query.

Thanks will try it and will post the results...
nani_nisha06 is offline   Reply With Quote