Bonsoir,
Quelqu'un peut me dire ce que veut dire cette erreur:
Meilleures salutations.:roll:Citation:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
Version imprimable
Bonsoir,
Quelqu'un peut me dire ce que veut dire cette erreur:
Meilleures salutations.:roll:Citation:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
Tu executes une requete paramétrée en fournissant moins ou plus de paramètres qu'elle n'en contient.
Mon code :
Merci pour votre aide...Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 //Insertion fiche function insertFiche($user, $nom, $age, $email, $portable, $horaires, $presentation, $specialites, $canton, $ville, $logo) { global $db; $sql = 'INSERT INTO fiches (user, nom, naissance, email, telephone, horaires, presentation, specialites, canton, ville, logo, date_enregistrement) VALUES (:user, :nom, :age, :email, :portable, :horaires, :presentation, :specialites, :canton, :ville, :logo, NOW())'; $statement = $db->prepare($sql); if ($statement->execute(array(':user'=>$user, ':nom'=>$nom, 'age'=>$age, ':portable'=>$portable, ':horaires'=>$horaires, ':presentation'=>$presentation, ':specialites'=>$specialites, ':canton'=>$canton, ':ville'=>$ville, ':logo'=>$logo))) { return $db->lastInsertId(); } } //Exécution du code... $idFiche = insertFiche($_SESSION['user'], $_POST['nom'], $_POST['age'], $_POST['email'], $_POST['portable'], $_POST['horaires'], $_POST['presentation'], $_POST['specialites'], $_POST['canton'], $_POST['ville'], $clean_name);
Prend la peine d'étudier un peu plus les réponses fournies quand même...:roll:
Ton param :email il est où...? ;)