Is there any way to implement simple queries using php+mysql?
给我你的怀抱
给我你的怀抱 2017-05-16 13:09:28
0
3
567

There are 500 pieces of data in the mysql database
100 of them are date: 2017-04-20
400 are date: 2017-04-21
Is there any way to combine these two fields through PHP? The content is displayed separately
For example, when 2017-04-20 is selected on the php page, only the 100 pieces of data are displayed

How to achieve this in php

给我你的怀抱
给我你的怀抱

reply all(3)
迷茫
    global $empire;
    $query = "select * from table where date='2017-04-20'" ;
    $sql=$empire->query($query);
    while($row=$empire->fetch($sql){
        //code
        echo $row['date']
    }
global $empire;
    $query = "select * from table where group by date" ;
    $sql=$empire->query($query);
    while($row=$empire->fetch($sql){
        //code
        echo $row['date']
    }

//这样就能获得所有日期且不重复了
左手右手慢动作

This is very easy. Your date is a field in the data inventory? Is the value Y-m-d or Y-m-d H:i:s? No matter what it is, just query it based on time? Difficulties?

phpcn_u1582

It’s very simple, but it needs to be done in combination with the front end. When you select 2017-04-20, you send a request to your php through ajax. The data sent is 2017-04-20, and your php processing page only You need to receive the time, then splice the sql, query, and then return the results to the front end.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template