S
S
Sergey Vladimirovich2018-12-05 13:27:48
PHP
Sergey Vladimirovich, 2018-12-05 13:27:48

Why is the date (Saturday) not displayed?

There is a table in it fields

CREATE TABLE IF NOT EXISTS `oqxic_ttfsp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idspec` int(11) DEFAULT '0',
  `iduser` int(11) DEFAULT '0',
  `reception` tinyint(1) UNSIGNED NOT NULL,
  `published` tinyint(1) UNSIGNED NOT NULL,
  `dttime` date NOT NULL DEFAULT '0000-00-00',
  `hrtime` varchar(2) NOT NULL DEFAULT '',
  `mntime` varchar(2) NOT NULL DEFAULT '',
  `ordering` int(11) NOT NULL DEFAULT '0',
  `checked_out` int(11) NOT NULL DEFAULT '0',
  `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `rfio` varchar(50) NOT NULL DEFAULT '',
  `rphone` varchar(20) NOT NULL DEFAULT '',
  `info` text NOT NULL,
  `ipuser` varchar(20) NOT NULL DEFAULT '',
  `ttime` int(11) NOT NULL,
  `plimit` int(11) NOT NULL,
  `rmail` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31713 DEFAULT CHARSET=utf8;


INSERT INTO `oqxic_ttfsp` (`id`, `idspec`, `iduser`, `reception`, `published`, `dttime`, `hrtime`, `mntime`, `ordering`, `checked_out`, `checked_out_time`, `rfio`, `rphone`, `info`, `ipuser`, `ttime`, `plimit`, `rmail`) VALUES
(31704, 1, 0, 0, 1, '2018-12-14', '17', '15', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544734800, 0, ''),
(31705, 1, 0, 0, 1, '2018-12-14', '18', '15', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544734800, 0, ''),
(31706, 1, 0, 0, 1, '2018-12-14', '18', '30', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544734800, 0, ''),
(31707, 1, 0, 0, 1, '2018-12-15', '09', '00', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, ''),
(31708, 1, 0, 0, 1, '2018-12-15', '12', '00', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, ''),
(31709, 1, 0, 0, 1, '2018-12-15', '09', '45', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, ''),
(31710, 1, 0, 0, 1, '2018-12-15', '12', '45', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, ''),
(31711, 1, 0, 0, 1, '2018-12-15', '10', '30', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, ''),
(31712, 1, 0, 0, 1, '2018-12-15', '11', '15', 0, 0, '0000-00-00 00:00:00', '', '', '', '', 1544821200, 0, '');

I get it from the base like this:
$today = date('Y-m-d');
$r = mysql_query("SELECT * FROM oqxic_ttfsp WHERE idspec = '1' AND dttime >= '2018-12-14' LIMIT 100");
if (mysql_num_rows($r) > 0) { 
while ($row=mysql_fetch_array($r))
{
//бла бла

the crux of the problem: I can’t get Saturdays, I just can’t get them in the request. I would like to know why this is happening and how to solve this problem. Friday 14 is the number for example I get and 15 is ignored and so every Saturday is ignored. An example of a table with the 14th and 15th of this month is above. I would be very happy for any help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-12-05
@spamboo

Unless the intrigues of the Jews can be explained, because in the query itself there is no mention of the day of the week, and there are no reasons not to show Saturday either. The code is absolutely correct. Perhaps you have not shown everything and filtering occurs during enumeration.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question