Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 预约_Php_Mysql_Sql_Appointment - Fatal编程技术网

Php 预约

Php 预约,php,mysql,sql,appointment,Php,Mysql,Sql,Appointment,我想根据php mysql中给定的日期和id,从两个不同的列(开始时间,结束时间)中选择两个给定时间(开始时间,结束时间)之间的数据 我的数据库如下所示 appointment_id name age email appointment_date appointment_time appointment_endtime user_id therapist_id status 4 testing 25 notjitendra@mail

我想根据php mysql中给定的日期和id,从两个不同的列(开始时间,结束时间)中选择两个给定时间(开始时间,结束时间)之间的数据

我的数据库如下所示

appointment_id name    age email                appointment_date appointment_time appointment_endtime user_id therapist_id status
             4 testing  25 notjitendra@mail.com       2015-11-03         01:00:00            02:00:00       2           12 SEND
             3 testing  25 notjitendra@mail.com       2015-11-03         01:00:00            02:00:00       2           12 SEND
             2 testing  25 notjitendra@mail.com       2015-11-03         01:00:00            02:00:00       2           12 SEND
             1 testing  25 notjitendra@mail.com       2015-11-03         05:00:00            06:00:00       2           12 SEND
我试着写一个类似这样的查询

"SELECT therapist_id, appointment_time, appointment_endtime 
 FROM appointment
 WHERE ((appointment_time BETWEEN '".$timee."' AND '".$end_time."' ) OR     
 (appointment_endtime BETWEEN '".$end_time."' AND '".$timee."') ) AND          
 therapist_id='".$_REQUEST['therapist_id']."' AND       
 appointment_date='".$_REQUEST['date']."'" 
试试这个:

"SELECT therapist_id,appointment_time,appointment_endtime FROM appointment     WHERE appointment_time>='$timee' and appointment_endtime<='$end_time' 
AND therapist_id='".$_REQUEST['therapist_id']."' AND appointment_date='".$_REQUEST['date']."'"
“从约会中选择治疗师id、约会时间、约会结束时间,其中约会时间>=“$timee”和约会结束时间尝试以下操作:

"SELECT therapist_id,appointment_time,appointment_endtime FROM appointment     WHERE appointment_time>='$timee' and appointment_endtime<='$end_time' 
AND therapist_id='".$_REQUEST['therapist_id']."' AND appointment_date='".$_REQUEST['date']."'"

“从预约位置选择治疗师id、预约时间、预约结束时间,$timee”和预约结束时间“给我正确的解决方案”=>请?“给我正确的解决方案”=>有人能帮我走上正确的轨道吗?1。我可以读那些电子邮件地址。所以,如果他们真的很敏感,考虑从你上传的任何地方删除该图像。2.参见规范化。在这个表中存储客户机信息显然是多余的。3.你真的不储存年龄,是吗?4.Consder将日期和时间存储为单个实体。效率更高。“给我正确的解决方案”=>请?“给我正确的解决方案”=>有人能帮我走上正确的轨道吗?1。我可以读那些电子邮件地址。所以,如果他们真的很敏感,考虑从你上传的任何地方删除该图像。2.参见规范化。在这个表中存储客户机信息显然是多余的。3.你真的不储存年龄,是吗?4.Consder将日期和时间存储为单个实体。效率更高。所以我想在
预约;从任命中删除--。您认为该日期仍然可用吗?回答选择治疗师id、预约时间、预约结束时间,从预约位置((预约时间介于“.$timee.”和“.$end\U time.”)或(预约时间介于“.$timee.”和“.$end\U time.”)和治疗师id=”$\U请求['治疗师id']。”和预约日期=”$\U请求['date'].“‘我很想在
预约’;从任命中删除--。您认为该日期仍然可用吗?回答选择治疗师id、预约时间、预约结束时间,从预约位置((预约时间介于“.$timee.”和“.$end\U time.”)或(预约时间介于“.$timee.”和“.$end\U time.”)和治疗师id=”$\U请求['治疗师id']。”和预约日期=”$\U请求['date']."'