Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Funzione per tutti i dati

    Buon moredì a tutti,
    Codice PHP:
    $query "SELECT * FROM dati; $result = mysql_query($query$db); 
    $row = mysql_fetch_array($result);
    $dato = str_crypt($row[Dato]$key);
    $query = "UPDATE dati SET Dato ='$dato' WHERE Dato ='$row[Dato]'$result mysql_query($query$db); 
    (in pratica ho aggiornato lo stesso dato).
    ...ecco

    se volessi farlo per un intero ciclo di dati??
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  2. #2
    Utente di HTML.it L'avatar di VaLvOnAuTa
    Registrato dal
    Jun 2002
    Messaggi
    2,003
    Codice PHP:
    $query "SELECT id,dato FROM dati";
    $result mysql_query($query$db); 
    while (
    $row mysql_fetch_array($result)) {
     
    $query "UPDATE dati SET Dato='".str_crypt($row['Dato'], $key)."' WHERE id=".$row['id'];
     
    mysql_query($query$db) or die(mysql_error());

    Considera però che se i dati sono tanti stai facendo un casino di query.

  3. #3
    mmm..non va.
    Mi lascia i dati invariati, non criptati!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  4. #4
    Utente di HTML.it L'avatar di VaLvOnAuTa
    Registrato dal
    Jun 2002
    Messaggi
    2,003
    Codice PHP:
    $query "SELECT id,dato FROM dati";
    $result mysql_query($query$db); 
    while (
    $row mysql_fetch_array($result)) {
     
    $crypt str_crypt($row['Dato'], $key);
     
    $query "UPDATE dati SET Dato='".$crypt."' WHERE id=".$row['id'];
     
    mysql_query($query$db) or die(mysql_error());

    E' strano che non funzioni... prova così.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.