title: PHP Warning: sprintf(): Too few arguments in
body: <p>I have a cronjob which runs a script -> getting data from different itunes stores. Sometimes i get the above mentioned error message. </p>
  
  <p>I think its because of special letters or something like this. Is there a way to check, where the problem exactly is? Which "special character" is respsonisble for the error. Is there a workaround for example with a IF statement? </p>
  
  <p>I can´t reproduce the error, as it not appears always. Would be great to get help on this. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>foreach ($Kategorien-&gt;entry as $item) {
       $id =  addslashes($item-&gt;id);
       $title = utf8_decode(addslashes($item-&gt;title));
       $preview = addslashes($item-&gt;link[1]["href"]);
       $namespaces = $item-&gt;getNameSpaces(true);
       $im = $item-&gt;children($namespaces['im']);
       $track_title =  utf8_decode(addslashes($im-&gt;name));
       $track_artist = utf8_decode(addslashes($im-&gt;artist));
       $track_amount = addslashes($im-&gt;price-&gt;attributes()-&gt;amount);
       $track_currency = utf8_decode(addslashes($im-&gt;price-&gt;attributes()-&gt;currency));
       $release_date =  addslashes($im-&gt;releaseDate);
       $image =  addslashes($im-&gt;image[2]);
       $entry_id['im'] = $item-&gt;id-&gt;attributes('im', TRUE);
       $track_id =  addslashes($entry_id['im']['id']);
       $category_id['im'] = $item-&gt;category-&gt;attributes('im', TRUE);
       $genre_id = addslashes($category_id['im']['id']);
       $genre_cat =  utf8_decode(addslashes($item-&gt;category-&gt;attributes()-&gt;term));
  
       $insertSQL = sprintf("UPDATE track_itunes_countries_total SET modified = NOW(), modified_genre = '$genre_name'  WHERE id = ".$row_select_country['id']."");
       $Result1 = mysql_query($insertSQL, $con) or die(mysql_error());
  
  
      $insertSQL = sprintf("INSERT INTO track_itunes_".$cc."_total (id, title, preview, track_title, track_artist, track_amount, track_currency, release_date, image, track_id, genre_id, genre_cat, country, Online, Approved) VALUES ('$id', '$title', '$preview', '$track_title', '$track_artist', '$track_amount', '$track_currency', '$release_date', '$image', '$track_id', '$genre_id', '$genre_cat', '$cc', '1', '1') ON DUPLICATE KEY UPDATE title='$title',preview='$preview',track_title='$track_title',track_artist='$track_artist',track_amount='$track_amount',track_currency='$track_currency',release_date='$release_date',image='$image',track_id='$track_id',genre_id='$genre_id',genre_cat='$genre_cat',country='$cc'");
  
          $Result1 = mysql_query($insertSQL, $con);}
  </code></pre>