Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    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.

  2. Users who have thanked Fou-Lu for this post:

    nani_nisha06 (11-17-2012)

  3. #17
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    159
    Thanks
    37
    Thanked 2 Times in 2 Posts
    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...

  4. #18
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    159
    Thanks
    37
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Fou-Lu View Post
    PHP Code:
    $iSuccessful += mysql_affected_rows($result); 
    .
    Fou-Lu,

    These suggestion worked like a charm with some personal customization....

    Really thanks full on your support....

    Regards,
    Nani


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •