Answer the question
In order to leave comments, you need to log in
How to retrieve data from database (PHP)?
Help, please) there is a table `p_operativ`. I enter the date there in the form: they $date = (date("Y.m.d"));
are entered into the database in the form of 2015-12-08 type date. Further I want to display the request the data relating to a certain date. I define the date like this:
$v = date ("Y-m-d", time() - ( -1 + date("N")-1) * 24*60*60);
$hz_query = "select * from `p_operativ`
where `po_agent` = ".$id_row['p_user_id']." and `po_date` = ".$v;
$hz_res = mysql_query($hz_query) or die(mysql_error());
$d = mysql_num_rows($hz_res);
$hz_row = mysql_fetch_assoc($hz_res);
Answer the question
In order to leave comments, you need to log in
the one associated with the date. if you remove and `po_date` = ".$v then the data is displayed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question