5
Well the date is in the format ( 2020-02-10 17:04:01 ) So I just want to take the month or day separately, the data is saved in the data Anco, I can get the whole date, but I wanted to take separately only the day and month. Here an excerpt from the code:
$query = "SELECT * FROM barraswiki ORDER BY aprovam DESC, reg_data DESC";
$data = mysqli_query($dbc, $query);
while($row = mysqli_fetch_array($data)){
$date = new DataTime($row['reg_data']);
$mes = data($date, 'd');
// code......
}
Thanks friend, but there was a mistake there in SELECT, the table name is barraswiki. So how do I get the table data? above you put ( *.barraswiki ), however it gave error. Could correct friend, already wrong.
– Fabrício Patrocinio
It was inverted, it was bad! >D
– Ivan Ferrer
Gee, it worked perfectly :) You have no idea how you helped me, I was studying date a lot in PHP, and I learned a lot, but your help showed me that I should have focused on SQL. Thanks so much for the help! Stay with God.
– Fabrício Patrocinio