Pods: Authors to Custom Field

Solved! I’ve created this script:

<?php
  global $wpdb;
  $postwp = $wpdb->get_results ( "SELECT ID,post_author,post_title FROM wp_posts WHERE post_status="publish" and post_type="post"" );
  $users = $wpdb->get_results ( "SELECT post_id,meta_value FROM wp_postmeta where meta_key = 'id_utente_user'" );

  foreach($postwp as $key1=>$value1)
  {
    foreach($users as $key2=>$value2)
    {
       if($value1->post_author==$value2->meta_value)
       {
           add_post_meta( $value1->ID, 'autore', $value2->post_id );
       }
   }
  }
  ?>

I hope It could be useful.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)