Function problems call the database content, determine whether to display this information by judging whether the unix time string is greater than the current time value, ask how to write this ------ solution ------------------ it is better to judge when using data. At least less data sets are returned. ------ Solution -------------------- compare your time with time () in strtotime. Http function problems
Call the database content to determine whether to display the information by judging whether the unix time string is greater than the current time value.
------ Solution --------------------
It is better to judge when using data. At least less data sets are returned.
------ Solution --------------------
In strtotime (), compare your time with time.
Http://www.w3school.com.cn/php/func_date_strtotime.asp
------ Solution --------------------
Directly return an empty string, so you do not need to judge whether to directly connect to the string.
Return "";
------ Solution --------------------
First, is the time field of the data in your database int (10)? If yes, if the name of this field is
Time when you search for data
Select * from tbl_name where time You can try select unix_timestamp (); this is to check the current timestamp. you can solve this problem directly in the database, so you don't need to search it for judgment. If the field in your database is of the time type Y-m-d H: I: s, it will be converted.
Select * from tbl_name where unix_timestamp (time) <unix_timestamp () and .....
Conversion method:
Select unix_timestamp ("18:55:05 ");
In this way, it is better to take some time to learn mysql functions, which can save a lot of time.
------ Solution --------------------
Discussion
Reference:
In strtotime (), compare your time with time.
Http://www.w3school.com.cn/php/func_date_strtotime.asp
{Dede: SQL = "select title, arcurl from dede_archives where sortrank> time ()"}