Problème dans le insert
jawadov11
Messages postés
39
Date d'inscription
Statut
Membre
Dernière intervention
-
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
bonjour je suis débutant en PHP et j'ai eu cette erreur la dans ma page
Fatal error: Uncaught Error: Call to undefined function month() in C:\xamp\htdocs\pharmacie\pro2.php:69 Stack trace: #0 {main} thrown in C:\xamp\htdocs\pharmacie\pro2.php on line 69
ligne 69 est $dt=month(CURDATE())-1;
Fatal error: Uncaught Error: Call to undefined function month() in C:\xamp\htdocs\pharmacie\pro2.php:69 Stack trace: #0 {main} thrown in C:\xamp\htdocs\pharmacie\pro2.php on line 69
ligne 69 est $dt=month(CURDATE())-1;
<?php
$dt=0;
$dt=month(CURDATE())-1;
echo $dt;
$mysqli->query("INSERT INTO sortie VALUES ('CURDATE()','$code','month(CURDATE())','year(CURDATE())','$quantite_sortie','day(CURDATE()','select (avg(quantite_sotie))as mmc from sortie where annee = year(CURDATE()) and mois = $dt and jour_s>0 and jour_s< 30'))")or die($mysqli->error);
?>
A voir également:
- Problème dans le insert
- Touche insert - Guide
- Disk boot failure insert system disk and press enter - Guide
- Activer touche insert sur ASUS UX32A - Forum Clavier
- Touche insert sur clavier portable hp ✓ - Forum Clavier
- Reboot and select proper boot device or insert boot media in selected boot device and press a key ✓ - Forum PC portable
Pourquoi le vouloir en php ?
Tu en as besoin ailleurs que dans ta requête ?
Si oui... il existe des tonnes de fonctions php pour manipuler les dates...
Par exemple :
et le plus simple quand tu ne sais pas... c'est de regarde ici :
https://www.google.com/search?q=php+get+current+month