best way of inserting multiple rows..

  1. global $user;
  2.  
  3.  
  4.   $copySrc = db_query("SELECT * FROM {openid_ax_values} WHERE uid='%d' AND persona_id='%d'",$user->uid, $form_state['values']['from_personas']);
  5.   while($vals = db_fetch_array($copySrc)) {
  6.         $insert .= "('$vals[ax_id]','$vals[ax_values]','$user->uid')";
  7.   }
  8.   $copyTrg = db_query("INSERT INTO {openid_ax_values}(ax_id, uid, persona_id, ax_values)  VALUES %s", $insert );
  9. //PS:: The insert aint proper right now. I just want to know the best way of doing this insert. The entire insert in one row will have problems with the escape feature of db_query. Multiple inserts in each loop of while is easily done though but will be a bad way of doing it!