between

jquery select elements between two elements that are not siblings

eg. [I've removed attributes, but it's a bit of auto-generated html] <img class="p"/> <div> hello world <p> <font><font size="2">text.<img class="p"/> some text</font></font> </p> <img class="p"/> <p> <font><font size="2">more text<img class="p"/> another piece of text </font><...

morethan one between clause

hi how can i use more than one 'between' clause in mysql query ? like if i want to select students having height between 20 and 25 and weight between 50 and 70.. thanks in advance tismon ...

mySQL : using BETWEEN in table ?

I have a table that includes some student group name, lesson time, day names like Schedule. I am using C# with MySql and I want to find which lesson is when user press button from table. I can find it by entering the exact value like in the table, e.g. 08:30 or 10:25. But I want to make that getting system time and checking that it is...

PHP: passing GET between multiple pages

I'm building a set of pages where I have a number of GET variables and it is often valuable to keep passing it along to the next page. This leads to ugly code where I have to have "if this $_GET variable is set, dynamically add it to this hyperlink". This is, in many senses, not a problem; but I had the thought "there must be a better wa...

jQuery select elements with value between x and y

Hello <input value="1" /> <input value="10" /> <input value="9" /> <input value="4" /> <input value="5" /> I'd like to be able to do that kind of selection: $('input[value between 6 and 11]'); Which would give me the 9 and 10. Is there a way to do that ? ...

Get data between two date on MySQL

Hello, How can I get the values between two dates. I want to get the values between 2010-01-02 and 2010-01-04. Example: Value DateTime A 2010-01-01 14:55:12 B 2010-01-02 14:55:12 C 2010-01-03 14:55:12 D 2010-01-04 14:55:12 E 2010-01-05 14:55:12 Thanks! ...

Complex Join - involving date ranges and sum...

I have two tables that I need to join... I want to join table1 and table2 on 'id' - however in table two id is not unique. I only want one value returned for table two, and this value represents the sum of a column called 'total_sold' - within a specified date range (say one month), however I want more than one date range at the same tim...

How Do I Search Between a Date Range, Using the ActiveRecord Model?

I am new to both Ruby and ActiveRecord. I currently have a need to modify and existing piece of code to add a date range in the select. The current piece goes like this: ReportsThirdparty.find(:all, :conditions => {:site_id=>site_id, :campaign_id=>campaign_id, :size_id=>size_id}) Now, I need to add a range, but I am not sure how to d...

Mysql select - improve performances

Hey, I am working on an e-shop which sells products only via loans. I display 10 products per page in any category, each product has 3 different price tags - 3 different loan types. Everything went pretty well during testing time, query execution time was perfect, but today when transfered the changes to the production server, the site ...

Select all months within given date span, including the ones with 0 values

Hi, I'm trying to write a MySQL query to get an average value per month, for all months between to given dates. My idea is this: Query, something like SELECT AVG(value1) as avg_value_1, AVG(value2) as avg_value_2, MONTH(save_date) as month, YEAR(save_date) as year FROM myTable WHERE save_date BETWEEN '2009-01-01' AND '2009-07-01' G...

How can I share a ViewModel between parent/child Views (Silverlight 3.0)?

I have a parent View that is xaml-binded to a ViewModel (the viewmodel is declared in the xaml). This parent view can then display a child View (via NavigationService, aka navigation:Frame). The parent view never goes out of scope, but I want the new child View to share the parent's ViewModel. How can i do this? Because by declaring t...

SQL Server select-where statement issue

Hello everyone, I am using SQL Server 2008 Enterprise on Windows Server 2008 Enterprise. I have a question about tsql in SQL Server 2008. For select-where statement, there are two differnet forms, (1) select where foo between [some value] and [some other value], (2) select where foo >= [some value] and foo <= [some other value]? I am ...

java example to get all weekend dates in a given month

Hi, I need to find all the weekend dates for a given month and year, eg: 01(month), 2010(year) . the output should be :- 2,3,9,10,16,17,23,24,30,31. all weekend dates. please any idea. usman ...

Is there a performance difference between BETWEEN and IN with MySQL or in SQL in general?

I have a set of consecutive rows I want to get based upon their primary key, which is an auto-incrementing integer. Assuming that there are no holes, is there any performance between between: SELECT * FROM `theTable` WHERE `id` IN (n, ... nk); and: SELECT * FROM `theTable` WHERE `id` BETWEEN n AND nk; ...

Get String Between 2 Strings

How can I get a string that is between two other declared strings, for example: String 1 = "[STRING1]" String 2 = "[STRING2]" Source: "832h0ufhu0sdf4[STRING1]I need this text here[STRING2]afyh0fhdfosdfndsf" How can I get the "I need this text here" using C++. ...

C# linq dates between

Hi I am tring to get a list of dates from my db that will eventually be used to populate a calendar. Each 'calendar event' has a start date & end date, i need to get all dates between & including the start & end date. i am stuck on the WHERE statement, as i am not sure what to use for this public List<EventFeed> GetCalendarDates() ...

mysql query where IN statement

Hi there. I want to do the following: SELECT count(id) FROM table WHERE value BETWEEN 3 AND 40; But it should do the following: SELECT count(id) FROM table WHERE value IN(3, 4, 5, 6, 7, 8, 9, 10, 11, ..., 40); It should even print out zero count(id) for value between 3 and 40, but not value = x. I want to check if a value is in a s...

why there's a difference of performance gain among both these queries?

SELECT instmax, r FROM (SELECT instmax, rownum r FROM ( SELECT instmax FROM pswlinstmax ORDER BY instmax DESC NULLS LAST ) WHERE rownum <= 10 ) WHERE r >=6; Output SELECT instmax, r FROM (SELECT instmax, rownum r FROM ( SELECT instmax FROM psw...

Struts2 get the text boxes (dynamic) to action class

I have struts page where the text boxes are with dynamic ID and wanted to get this values into Action class. Can someone please help me with the code plz. ...

MySQL SELECT MIN for all time, but only return if BETWEEN dates

I can certainly do this by iterating through results with PHP, but just wanted to know if someone had a second to post a better solution. The scenario is that I have a list of transactions. I select two dates and run a report to get the transactions between those two dates...easy. For one of the reporting sections though, I need to on...