Could you tell me a question about php Data processing?

Source: Internet
Author: User
Tags date1
For more information about php Data processing, see "php" and "mysql" for a patient appointment statistics function. by default, all visiting data is displayed when the page is loaded, you can also enter the period of the visit date for search: how to implement this function now, the following code is what I implement now, may be written incorrectly, please help implement this function. Mysql data table structure CREATETABLE 'Yu master please, ask a question about php Data processing
Use php and mysql to implement a patient appointment statistics function:
By default, the page is loaded to display all the data sent to the clinic. you can also enter the period of the visit date to search:
How to implement this function now? the following code is part of my current implementation, which may be incorrectly written. please help me implement this function.


Create table 'yuyuue '(
'Id' int (11) not null auto_increment, 'id automatic number
'Fangshi 'varchar (250) default NULL, 'reservation method: divided into network and telephone
'Yydate' varchar (250) default NULL, 'reservation date
'Djdate' varchar (250) default NULL, 'registration date
'Dzhen' int (11) default '0', 'whether to visit: 0 return, 1 is
'Dzdate' varchar (250) default NULL, 'to date of diagnosis
Primary key ('id ')
) ENGINE = MyISAM AUTO_INCREMENT = 2333 default charset = utf8;


Function. inc. php
PHP code
  
  = '$date1' and `dzdate` <= '$date2' ";        }        if( !empty($date1) && empty($date2) ){            $sql = $sql." and `dzdate` = '$date1'";            }        if( empty($date1) && !empty($date2) ){            $sql = $sql." and `dzdate` <= '$date2'";            }        return $sql;    }



PHP code
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.