daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Sep 19th, 2016 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  $server = "localhost"; // Serveur MySQL
  3. $db_user = "root"; // Utilisateur MySQL
  4. $db_pass = "ue23hasok6se"; // Pass de la base
  5. $base = "hakaekold"; // nome de la base MySQL
  6. mysql_pconnect("$server","$db_user","$db_pass");
  7. mysql_select_db("$base");
  8. $req = mysql_query("select * from db_articles") or die ('ERREUR :'.$req.' '.mysql_error());
  9. ?>
  10.  
  11. removing the ../up_new/ from fichier
  12.  
  13.  
  14.  
  15. <?php
  16. $num_rows = mysql_num_rows($req);
  17. $queries = array();
  18. echo "$num_rows Rows\n";
  19. while($r=mysql_fetch_array($req))
  20.     {    
  21.     $id = $r["id"];
  22.     $orig = $r["photo_big"];  
  23.    
  24.     $str2 = substr($orig, 21);
  25.    
  26.  
  27.     echo"<pre>";
  28.     print $str2;
  29.     echo"</pre>";
  30.     $queries[] = "UPDATE db_articles SET photo_big='$str2' WHERE id='$id'";
  31. //$req2 = mysql_query("UPDATE db_articles SET photo_big='$str2' WHERE id='$id' ") or die ('ERREUR :'.$req2.' '.mysql_error());
  32.  
  33.  
  34.  
  35.     }  
  36.     echo"<div style='color:#FFF; position:absolute; top:0; right:0; background:green; width:50px; padding:1em;'>fini</div>";
  37.  
  38. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top