Between ou like ou =

ludwigfve Messages postés 52 Date d'inscription lundi 13 février 2006 Statut Membre Dernière intervention 10 juillet 2008 - 3 juin 2008 à 14:35
GillouXman Messages postés 561 Date d'inscription mardi 4 mars 2008 Statut Membre Dernière intervention 10 juin 2010 - 3 juin 2008 à 16:49
Voici mon code avec lequel je veux que la valeur de la requête  soit comprise entre heure_de_debut et heure_de_fin donc si h de  début=08h30 eth de fin 09h30 je veux que 09h00 soit inclus dans ma requête



<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" /??>

 





check_cmd.CommandText "SELECT * FROM salons WHERE salon ? AND date_de_reservation = ?  AND  heure_de_debut = ?  OR  heure_de_fin<= ?"




 






 





<%



Dim check__MMColParam



check__MMColParam = "1"



If (Request.Form("salon") <> "") Then



  check__MMColParam = Request.Form("salon")



End If



%>



<%



Dim check__MMColParam2



check__MMColParam2 = "1"



If (Request.Form("resa")   <> "") Then



  check__MMColParam2 = Request.Form("resa") 



End If



%>



<%



Dim check__MMColParam3



check__MMColParam3 = "1"



If (Request.Form("debut")       <> "") Then



  check__MMColParam3 = Request.Form("debut")     



End If



%>



<%



Dim check__MMColParam4



check__MMColParam4 = "1"



If (Request.Form("fin")    <> "") Then



  check__MMColParam4 = Request.Form("fin")  



End If



%>



<%



Dim check



Dim check_cmd



Dim check_numRows




 





Set check_cmd = Server.CreateObject ("ADODB.Command")



check_cmd.ActiveConnection = MM_wilson_STRING



check_cmd.CommandText "SELECT * FROM salons WHERE salon ? AND date_de_reservation = ?  AND  heure_de_debut = ?  OR  heure_de_fin<= ?"



check_cmd.Prepared = true



check_cmd.Parameters.Append check_cmd.CreateParameter("param1", 200, 1, 255, check__MMColParam) ' adVarChar



check_cmd.Parameters.Append check_cmd.CreateParameter("param2", 200, 1, 255, check__MMColParam2) ' adVarChar



check_cmd.Parameters.Append check_cmd.CreateParameter("param3", 200, 1, 255, check__MMColParam3) ' adVarChar



check_cmd.Parameters.Append check_cmd.CreateParameter("param4", 200, 1, 255, check__MMColParam4) ' adVarChar




 





Set check = check_cmd.Execute



check_numRows = 0



%>

1 réponse

GillouXman Messages postés 561 Date d'inscription mardi 4 mars 2008 Statut Membre Dernière intervention 10 juin 2010
3 juin 2008 à 16:49
Bonjour à toi ausi et merci d'avance ...
0
Rejoignez-nous