Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1769 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  Bytes[] et MySQL

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Bytes[] et MySQL

n°530119
Shogun2002
Posté le 03-10-2003 à 10:53:12  profilanswer
 

Un champs de format Bytes[] sous quel format je dois l'enregistrer dans ma base de donnée MySql pour que cela puisse pris en compte ?

mood
Publicité
Posté le 03-10-2003 à 10:53:12  profilanswer
 

n°530122
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 03-10-2003 à 10:55:08  profilanswer
 

Blob. Lis la doc, bon dieu : http://www.mysql.com/doc


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°530148
Shogun2002
Posté le 03-10-2003 à 11:13:59  profilanswer
 

Trouve pas  :sweat:

n°530150
benou
Posté le 03-10-2003 à 11:14:21  profilanswer
 

dieu n'a rien à voir dans cette histoire :o


---------------
ma vie, mon oeuvre - HomePlayer
n°530164
Shogun2002
Posté le 03-10-2003 à 11:37:37  profilanswer
 

J'ai mis comme champs un bête Varchar(30) et ça à l'air de fonctionner ....

n°530238
darklord
You're welcome
Posté le 03-10-2003 à 13:03:59  profilanswer
 

mais c'est pas possible, tu le fais exprès? :sweat:


---------------
Just because you feel good does not make you right
n°530242
darklord
You're welcome
Posté le 03-10-2003 à 13:05:20  profilanswer
 

Shogun2002 a écrit :

Trouve pas  :sweat:  


 
j'ai pris le lien de taiche, 30 sec après
http://www.mysql.com/doc/en/Column_types.html
 
Si 'ca a l'air de marcher' te suffit, te casse pas la tête tout va bien :o


---------------
Just because you feel good does not make you right
n°530456
Shogun2002
Posté le 03-10-2003 à 16:51:13  profilanswer
 

Si mon anglais est bon ... un champs Varchar convient amplement  :o  
 
Mais ils conseillent de mettre en Char avec le cryptage MD5 mais bon je laisse en Varchar

n°530465
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 03-10-2003 à 17:05:51  profilanswer
 

Ah, c'est toujours ton histoire de password [:ddr555]
Bin à partir des bytes que MD5 t'a générés, t'es capable de construire une String et donc de balancer le tout dans un varchar, ui [:spamafote]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°530467
darklord
You're welcome
Posté le 03-10-2003 à 17:08:55  profilanswer
 

[:mlc]


---------------
Just because you feel good does not make you right
mood
Publicité
Posté le 03-10-2003 à 17:08:55  profilanswer
 

n°530470
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 03-10-2003 à 17:10:25  profilanswer
 

Arrête d'halluciner comme ça, tu vas t'faire mal aux yeux [:ddr555]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°530478
Shogun2002
Posté le 03-10-2003 à 17:15:36  profilanswer
 

Le probleme est cela ...
 
Si je donne mon code en format Bytes[] -> toto obtenu par le MD5 et que je le converti en string -> tata
 
tata=toto.toString();
 
Et hop, j'insere tata dans ma base dans un champs de type varchar.
 
Et qu'après on me donne un password a vérifier si il n'est pas identique à toto et dans le cas où il est identique, il me dit que non !
 
tata.equals((testpass.cryptage()).toString);
 
Il me ressort false !
 
Donc le toString ... et à laisser de coté ...


Message édité par Shogun2002 le 03-10-2003 à 17:16:53
n°530479
Shogun2002
Posté le 03-10-2003 à 17:19:42  profilanswer
 

Ah moins qu'en faisant le test inverse :
 
(tata.getBytes()).equals(testpass.cryptage()))  
 
ça peut marcher


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  Bytes[] et MySQL

 

Sujets relatifs
PHP & requêtes mySQL : optim : libération mémoire en cours de script ?[MySQL] récupérer le premier élément d'une structure hiérarchique...
mssql -> mysqlMethode pour modifier un enreg de MySQL ?
[PHP/MySQL] Apporter une modification à la DB[MySQL + PHP] Récupérer ne nb d'elements effacés par DELETE
[MySQL] securite sur le load data[MySQL] lister des valeurs qui sont dans T1 mais pas dans T2
recherche bouqin sur Php et MySqlMySQL changer le prochain auto increment
Plus de sujets relatifs à : Bytes[] et MySQL


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR