|
|
Code (SQL)
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 22, 2020 at 04:08 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `movie`
--
-- --------------------------------------------------------
--
-- Table structure for table `banned`
--
CREATE TABLE `banned` (
`id_banned` int(11) NOT NULL,
`id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`img` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`date_start` date NOT NULL,
`date_end` date NOT NULL,
`status` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `banned`
--
INSERT INTO `banned` (`id_banned`, `id`, `img`, `link`, `date_start`, `date_end`, `status`) VALUES
(1, 'A1', 'A1-banner-movie2uhd.webp', 'https://localhost/', '2020-05-22', '2020-09-27', 'open'),
(2, 'A2', 'tcom-new.webp', 'https://localhost/', '2020-05-22', '2020-08-30', 'open'),
(3, 'A3', 'ufa88.webp', 'https://localhost/', '2020-05-22', '2020-05-31', 'open'),
(4, 'A4', 'Dubai-new.webp', 'https://localhost/', '2020-05-22', '2020-10-17', 'open'),
(5, 'A5', 'macao-a.webp', 'https://localhost/', '2020-05-22', '2020-09-26', 'open'),
(6, 'B1', 'ป้ายใหม่cr7.webp', 'https://localhost/', '2020-05-22', '2020-08-16', 'open'),
(7, 'B2', 'lion123.webp', 'https://localhost/', '2020-05-22', '2020-09-27', 'open'),
(8, 'B3', '200x272.webp', 'https://localhost/', '2020-05-22', '2020-08-16', 'open'),
(9, 'B4', 'b4-200x272.webp', 'https://localhost/', '2020-05-22', '2020-09-27', 'open'),
(10, 'C1', 'GIF-FOR-AD-Size-772X130-px.webp', 'https://localhost/', '2020-05-22', '2021-01-09', 'open'),
(11, 'C2', 'R1.webp', 'https://localhost/', '2020-05-22', '2020-10-25', 'open'),
(12, 'C3', 'SA56.webp', 'https://localhost/', '2020-05-22', '2020-09-27', 'open'),
(13, 'C4', 'ufabet123-2.webp', 'https://localhost/', '2020-05-22', '2020-10-25', 'open'),
(14, 'C5', 'yeekee800.webp', 'https://localhost/', '2020-05-22', '2020-06-14', 'open'),
(15, 'D1', '200x290.webp', 'https://localhost/', '2020-05-22', '2020-10-25', 'open'),
(16, 'D2', '222.webp', 'https://localhost/', '2020-05-22', '2020-09-27', 'open'),
(17, 'D3', 'SLOTXO-VIP.webp', 'https://localhost/', '2020-05-22', '2021-04-24', 'open'),
(18, 'D4', 'banner200x290-3.gif', 'https://localhost/', '2020-05-22', '2020-05-31', 'open'),
(19, 'D5', '188bet-pro4-2020.webp', 'https://localhost/', '2020-05-22', '2020-07-11', 'open'),
(20, 'D6', 'ad-gif-scs188.gif', 'https://localhost/', '2020-05-22', '2020-08-23', 'open'),
(21, 'D7', '0060-200x290-05-03.webp', 'https://localhost/', '2020-05-22', '2020-07-12', 'open'),
(22, 'D8', 'newbanner.gif', 'https://localhost/', '2020-05-22', '2020-07-26', 'open'),
(23, 'D9', '111.webp', 'https://localhost/', '2020-05-22', '2020-06-13', 'open'),
(24, 'D10', '200X290.webp', 'https://localhost/', '2020-05-22', '2020-06-28', 'open'),
(25, 'D11', 'ad-gif-ssslotto.gif', 'https://localhost/', '2020-05-22', '0000-00-00', 'open'),
(26, 'D12', 'Newbanner.webp', 'https://localhost/', '2020-05-22', '2020-06-28', 'open'),
(27, 'D13', '188bet-pro4-2020.webp', 'https://localhost/', '2020-05-22', '2020-08-30', 'open'),
(28, 'D14', 'SAPro.webp', 'https://localhost/', '2020-05-21', '0000-00-00', 'close'),
(29, 'E1', 'macao888.webp', 'https://localhost/', '2020-05-22', '2020-10-25', 'open'),
(30, 'E2', 'คาสิโนล้วนsagame77-130x385.webp', 'https://localhost/', '2020-05-22', '2020-08-30', 'open'),
(31, 'E3', 'SAPro.webp', 'https://localhost/', '2020-05-22', '2020-09-13', 'open'),
(32, 'E4', '130x385.webp', 'https://localhost/', '2020-05-22', '2020-08-30', 'open'),
(33, 'E5', 'macao773x130.webp', 'https://localhost/', '2020-05-22', '2020-08-30', 'open');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `banned`
--
ALTER TABLE `banned`
ADD PRIMARY KEY (`id_banned`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `banned`
--
ALTER TABLE `banned`
MODIFY `id_banned` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
จากตาราง date_end จะเขียนยังไงครับ ถ้าถึงวันที่เราลงไว้แล้ว ให้มันอัพเดพตาราง status จาก open เป็น close
จะเขียนแบบนี้ได้ไหมครับ $sql = "SELECT * FROM banned where date_end < NOW()"; แล้วถ้าได้ต้องเขียนยังไงต่อครับ
Tag : PHP, MySQL, HTML, HTML5, JavaScript
|
ประวัติการแก้ไข 2020-05-24 11:36:12
|
|
|
|
|
Date :
2020-05-23 22:05:33 |
By :
skyblack2009 |
View :
655 |
Reply :
5 |
|
|
|
|
|
|
|
|
|