473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

select week in date

hii

i have face a problem in mysql .i have a table register and have a field

uid,name,date

so i have want to select uid by weekly,means whose registration in current week
so plz help me and find the solution

thanks
Dec 18 '06 #1
3 5222
ronverdonk
4,258 Expert 4TB
Depending on what day your week (Sunday or Monday) starts this could do it:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM table 
  2. WHERE DATE_FORMAT(date, "%u") = DATE_FORMAT(curdate(), "%u");
Ronald :cool:
Dec 18 '06 #2
tnxx for this soln

one question or more

mysql support foriegn key or not, if not then what is the alternative.
and support constraiont or not plz reply me

bye
Dec 21 '06 #3
ronverdonk
4,258 Expert 4TB
You have already started a new thread in this forum with that last question. Don't overdo it!

Ronald :cool:
Dec 21 '06 #4

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

Similar topics

3
by: bad | last post by:
i´ve two variables the year and the week (2003 and 5) that means the 5th week of the year 2003. now i need the start- and enddate of the 5th week of year 2003. i hope someone can help me to...
2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
2
by: hikums | last post by:
how can I use a function inside a function, for example I want to select col1, col2 from table1 where locate(dayofweek(current date),col3) =dayofweek(current date) col3 is a field that contains a...
3
by: Matt | last post by:
Given a date, how to find the beginning date and ending date of that week please advise!
0
by: Lee Harr | last post by:
I wrote a function to return the first date of a given week (and a few related functions) : -- return the first date in the given week CREATE or REPLACE FUNCTION week_start(integer, integer)...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
6
by: aarklon | last post by:
Hi folks, I found an algorithm for calculating the day of the week here:- http://www.faqs.org/faqs/calendars/faq/part1/index.html in the section titled 2.5 what day of the week was 2 august...
3
by: jessDMiller | last post by:
I need to output data for today and the following week. Here is what I have: // Get all the data from the table $result = mysql_query("SELECT * FROM $table where curdate() >= day AND...
2
by: cmartin1986 | last post by:
First of all I want to thank all of you that have helped me in the past this is an awesome fourm. My problem today is I have a database that builds charts that are viewed by a large group every...
1
by: kropinek | last post by:
Hello! I have got: SELECT char(week_iso(current date)) FROM sysibm.sysdummy1 +------------+ | 00001 | +------------+ | 45 | +------------+
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.