Fatal error: Uncaught exception ‘Exception’ with message
‘DateTime::_construct() [datetime.–construct]: Failed to parse
time string (Resource id #7) at position 0 (R): The timezone could not
be found in the database’ in Z:\home\plati\www\view.php:21 Stack
trace: #0 Z:\home\plati\www\view.php(21):
DateTime->_construct(‘Resource id #7’) #1 {main} thrown in
Z:\home\plati\www\view.php on line 21
have ithis error what do?
line 20…
$date = mysql_query("SELECT date FROM sondaje WHERE id = '$id'") or die("Error! DataBase Name Incorrect!");
$bdate = new DateTime("$date");
$bdate->modify('+8 day');
$yearz = $bdate->format('Y');
$monthz = $bdate->format('m');
$dayz = $bdate->format('d');
$hourz = $bdate->format('H');
$minutz = $bdate->format('i');
$secndz = $bdate->format('s');
you need to fetch the data from as
mysql_query()returns only link identifier, from manual: