473,569 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to write MySQL command

1 New Member
i have table name login_master and one field in there is "date_of_ev ent"
example value date_Of_Event Jun 7, 2006 3:31:10 AM

Jun 7, 2006 to Jun 11, 2006 (I don't need time),how to write MySQL command?

pls help me

with regards,
rajesh
Jan 29 '08 #1
4 2057
debasisdas
8,127 Recognized Expert Expert
You need to convert the date to proper format for the purpose.
Jan 29 '08 #2
mwasif
802 Recognized Expert Contributor
What is the datatype of date_of_event? It looks like your data is in string format, then you can use STR_TO_DATE() function. In case of datetime data type, you can use DATE_FORMAT().
Feb 6 '08 #3
amitpatel66
2,367 Recognized Expert Top Contributor
i have table name login_master and one field in there is "date_of_ev ent"
example value date_Of_Event Jun 7, 2006 3:31:10 AM

Jun 7, 2006 to Jun 11, 2006 (I don't need time),how to write MySQL command?

pls help me

with regards,
rajesh
Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT * FROM login_master WHERE DATE_FORMAT(date_of_event, '%M %e %Y')  BETWEEN DATE_FORMAT('June 7 2006','%M %e %Y') AND DATE_FORMAT('June 11 2006','%M %e %Y');
  3.  
  4.  
Feb 7 '08 #4
Expand|Select|Wrap|Line Numbers
  1. $tourneylist=mysql_query("SELECT tid,name FROM tourneys ORDER by name");
  2. while(list($tid,$name)=mysql_fetch_row($tourneylist)){
  3. $tourneylistid.="<option value='$tid'>$name</option>\n";
  4. }
  5.  
Oct 19 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2551
by: Cathy Hui | last post by:
Do u know why do i get the following message when trying to build the MySql-Python (1.2.0) on my Solaris 8 system? (with mysql 4.0.21 and python 2.4). thanks! error mesg: ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1
3
863
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to Mandrake 9.2 and am reinstalling everything. This thing is kicking my ass and I can't seem to get past it. I could really use some help if...
0
5829
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to Mandrake 9.2 and am reinstalling everything. This thing is kicking my ass and I can't seem to get past it. I could really use some help if...
0
3931
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
4
5850
by: Dave | last post by:
I have a MS sql 2000 db that needs to sync with a Mysql db. When a password is changed in the MS SQL table, I need to make sure that the same value is updated in the Mysql db. I dont have any control of the gui that is initiating this event. So, I was thinking a trigger might be an alternate route. I just dont know how to get the...
16
27880
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my own LAN, the driver tells me it cannot make the connection. Here are the ODBC driver connection parms: Data Source Name: (free field - name my "my...
1
2819
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work. Despite entering the required lines to "my.ini" (the new my.cnf) through notepad AND MySQL Administrator, the cache does not work. So, today I took a...
3
10297
by: the.natalie | last post by:
Hi. I am a newbie to mysql, cron, and shell scripting, so please bear with me. I have a script that is used for updating an image directory based on contents in a database. The script does the following: runs several queries against different tables in a database; returns several lists of pictures being used in the database; removes any...
3
3378
by: apostolosl | last post by:
Hi there. I need to update a remote database from a local one. I use mysqldump in my php page in order to create a file for each table, like this: $command="mysqldump table_products > table_products.sql"; system($command); This works perfect and it gives me a file with a drop-table, create-table and all the insert values.
6
38477
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get through this without much trouble. Programming knowledge is not required. Index What is SQL? Why MySQL? Installing MySQL. Using the MySQL...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.