Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/styllloz/public_html/qa-include/qa-base.php on line 1175

Warning: session_start(): Cannot start session when headers already sent in /home/styllloz/public_html/qa-include/app/users.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/users.php on line 1267

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/page.php on line 356
Why not output a date (Saturday afternoon)? - code-flow.club | Q&A

Why not output a date (Saturday afternoon)?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
10 views
There is a table in it field
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, ");


Get from database this way :
$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)) { //blah blah


the problem : can't get Saturday days I just can't get in the query. I would like to know why is this happening and how to solve this very problem. 14 Friday for example I get number 15 and the number is ignored and so is ignored every Saturday. Sample table 14 and 15th of this month above. I would highly appreciate any help
by | 10 views

1 Answer

0 like 0 dislike
Except that the machinations of the Jews can be explained because in the query itself, no mention the day of the week no, and no reason not to show it Saturday either. Code is absolutely correct. Perhaps you are not all shown and the filtering occurs while iterating.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 1, 2019 by dmitrybascacov
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
35,181 users