J'ai un problème entre php et mysql
Je récupère par un formulaire des données diverses dont des chiffres
J'ai mis des "trim" à chaque saisie, mais dans ma table je retrouve quand même un blanc devant les chiffres en particulier
extrait de code php
$desi= trim(mysql_real_escape_string($_POST['desi']));
$num= trim(mysql_real_escape_string($_POST['numero']));
Le problème se pose principalement sur la colonne "numero text NOT NULL"Extrait de la table
$sql='CREATE TABLE dispo ( tab int(11) NOT NULL auto_increment, designation text NOT NULL, numero text NOT NULL, catalogue text NOT NULL, pays text NOT NULL, annee text NOT NULL, cote text NOT NULL, theme text NOT NULL, info text NOT NULL, image text NOT NULL, nom text NOT NULL, mail text NOT NULL, date text NOT NULL, etat text NOT NULL, teleph text NOT NULL, visible text NOT NULL, chex text NOT NULL,lib4 text NOT NULL,lib5 text NOT NULL,lib6 text NOT NULL,lib7 text NOT NULL,lib8 text NOT NULL,lib9 text NOT NULL,lib10 text NOT NULL, PRIMARY KEY (tab) )';
mysql_query($sql)or die ('Erreur SQL !'.$sql.'<br>'.mysql_error());
Je ne comprend pas pourquoi ce "blanc" est ajouté et il me pose problème.
Merci de votre aide