title: Duplicate ID when generating member numbers at the same time
body: <p>I have a for where you capture new user information. I generate a member number by getting an incremented last number .
  What happen now, is 2 admin users create 2 new users from different sites,
  Both get the same last id and when one trying to save it , the getting errors because the first admin users now already saved his user with the same last number.
  here is basically what I do </p>
  
  <p>id_count is an AI field</p>
  
  <p>The Admin select add user from the front end.</p>
  
  <p>the following query run and bring back the last number </p>
  
  <pre><code>SELECT id_count FROM members order by id_count DESC Limit 1
  member_id = $row['id_count'] +1
  </code></pre>
  
  <p>now if i have 2 admin users doing this at exactly the same time. both get the same new member number. Admin1 safe his user and it is fine. Now when Admin2 safe the information the new number already exist and information don't safe. member number is unique field</p>