PHP Champ mysql

gilbert1995 Messages postés 414 Date d'inscription   Statut Membre Dernière intervention   -  
gilbert1995 Messages postés 414 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
voila la structure de ma table INFO
Champ 	Type  	         Null 	

id 	        int(11) 	         Non  	  	 
nom  	varchar(255) 	 Non  	  	 
tel 	        varchar(255) 	 Non  	  	 
adresse 	varchar(255) 	 Non  	  	 
tel_ok 	varchar(255) 	 Non  	  	 
commande_ok 	varchar(255) 	Non 


je veux faire une commande php qui met tel_ok a la valeur 0 et ce peut importe le nombre de ligne

A voir également:

2 réponses

A.nonymous
 
:/
$sql = "UPDATE 'INFO'SET tel_ok = '0'";
mysql_query($sql);
1
gilbert1995 Messages postés 414 Date d'inscription   Statut Membre Dernière intervention   29
 
oui j'ai allumer après merci
0
gilbert1995 Messages postés 414 Date d'inscription   Statut Membre Dernière intervention   29
 
$sql = "ALTER TABLE info DROP tel_ok, DROP commande_ok;";
mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());

$sql2 = "ALTER TABLE info ADD tel_ok VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0' AFTER adresse";
mysql_query($sql2) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());

$sql3 = "ALTER TABLE info ADD commande_ok VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0' AFTER tel_ok";
mysql_query($sql3) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
0