MySQL - SELECT ... YESTERDAY

Last update on October 3, 2009 07:54 AM by jak58
Published by netty5

MySQL - SELECT ... YESTERDAY


  • Make use of the following syntax:
    • SELECT * FROM myTable WHERE field_date = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 1 DAY)
  • In order to select previous records:
    • SELECT * FROM myTable WHERE field_date = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 2 DAY)
Best answers for « MySQL SELECT ... YESTERDAY » in :
Mktime() - Timestamp yesterday, last month, etc.). Show Mktime() - Timestamp yesterday, last month, etc.) Intro Last 24 hours Yesterday This week Last week This Month Last 30 days (last 30 days) Last month Current year(this year) Last year (last year) Intro The mktime()function...
Reinitializing the root password of MySQL Show Reinitializing the root password of MySQL The root password is lost! Reinitializing the password: It's important that you are able to access and modify the admin (root) password of MYSQL, either when installing MySQL for the first...
Backup/Restore Mysql database Show Backup/Restore Mysql database Backup Restore your database Note A simple approach on how to backup and restore MySQL databases. Backup To save an existing database it is recommended that you create a dump. To dump all...
Unable to load dynamic library '/usr/lib/php4/20020429/mysql.so ShowUnable to load dynamic library '/usr/lib/php4/20020429/mysql.so You get a message like following following an update to PHP: Unable to load dynamic library '/usr/lib/php4/20020429/gd2.so' - /usr/lib/php4/20020429/gd2.so: cannot open...
MySQL in console mode on Windows: disable the beep error ShowMySQL in console mode on Windows: disable the beep error When you use MySQL in console mode under Windows, each error causes a beep. Beleive me it can be very annoying!!! To disable it, you simply add the parameter-b in your connection...
[MySQL]Loading a text file into ue table Show[MySQL]Loading a text file into ue table To load a text file as follows: $ tail /home/user1/test.txt 'name1',1,9 'name2',2,3 'name3',3,54 'name4',4,2 'name5',5,9 In a table defined as follows: CREATE TABLE...
Download MySQL Essential ShowMySQL 5.4 Essential which is recommended for most users is one of the world’s most popular open source database. Includes a configuration wizard for optimal use. It is the most trustworthy, secure and up to date version of most database. To know...
Download MicroOLAP Database Designer for MySQL ShowMicroOLAP Database Designer for MySQL is a powerful development system for database visual modeling, modification, maintenance and reverse engineering in an easy and powerful way. MicroOLAP Database Designer for MySQL also allows to publish or to...
ATA, IDE and EIDE ShowOverview The ATA (Advanced Technology Attachment) standard is a standard interface that allows you to connect storage peripherals to PC computers. The ATA standard was developed on May 12, 1994 by the ANSI (document X3.221-1994). Despite the...
HTML forms ShowForms Interactive forms let web page authors give their pages interactive elements, such as for receiving messages from their readers, much like the reply cards found in some magazines. The reader enters information by filling in fields or clicking...
Spreadsheet - Formulas ShowIntroduction to Formulas The main use of a spreadsheet is to automate calculations, which means using cells to perform operations based on values in other cells. The spreadsheet recalculates all the values each time a change is made to the value of...