Dates NOT IN Query Confusion
I have a table of properties and a table of dates, each date relates to when a property is BOOKED.
I am trying to write a search so that users can find available properties for their desired date range. I have a query that s working, but I think that it might need to change for other variables!
Code:
SELECT DISTINCT pid FROM properties WHERE pid NOT IN (SELECT pid FROM cal WHERE takendate between '2009-01-20' and '2009-01-29') AND property_publish='Y' AND property_sleeps >='1'
cal table stores:
pid (property id)
takendate
In this instance the dates 2009-01-20 -> , 2009-01-23 are TAKEN, however dates from 2009-01-24 -> 2009-01-29 are AVAILABLE.
How would I flag it as available if only some of the dates are available? (eg. only hide property if ALL the date range is taken)
View Complete Forum Thread with Replies
Related Forum Messages:
Design / Query Confusion - Joins?
Sorry for the long post here. I'm trying to give enough info. to explain my situation, and am novice enough to not know how much someone might need to know to help. I'm very new to SQL, I've read through the Sitepoint "Build Your Own Database Driven Website" book, and though I did follow it, I didn't build the joke database, I just converted it to the specific task I want to do to organize some stuff for my department at work. Basically what I am doing is tracking design drawings; Job name and number, clients, architects, when drawings leave and return for approvals, to the shop and field, etc... Getting all the information that our detailers might need, in one place. Where I'm running into problems, is designing the database with some thought on how we set up our job numbers and attempting to keep the tables fairly small by creating tables for each year. A typical job number would be something like: B06-064 (B is first initial of the Project Manager - 06 for the year - and 064 for the 64th job that year) 04_jobs, 05_jobs, and 06_jobs all have the same columns: CREATE TABLE 04_jobs ( job_year YEAR(2) NOT NULL DEFAULT ཀ', id SMALLINT(3) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, job_name VARCHAR(255), pm_id TINYINT(3), client_id SMALLINT(4), arch_id SMALLINT(4), finished SET(Ɔ', Ƈ') NOT NULL DEFAULT Ɔ', PRIMARY KEY ( job_year, id) ); The job_year seems a bit redundant since the tables are named by year- I was thinking the problem with my select query had to do with the duplicate PKs (id) across tables - this may be a good indication of how little I understand everything - I just added this column and changed the PK this morning. When I run a query such as: SELECT * FROM 04_jobs, 05_jobs; I get rows joined together - each job in each tabled joined on rows. not what I was expecting. - getting a row for each job - as if the query were on a single table. When I run a query such as: SELECT * FROM 04_jobs, 05_jobs WHERE pm_id="1"; I get an error that the clause is ambiguous. I guess where I'm most confused is not knowing if its: 1. a design flaw 2. a query flaw (everything I've read so far on JOIN seems directed at joining rows - which isn't what I want) 3. Something that is easily handled with a PHP loop (I'm new to PHP too). I'm doing everything on a command line for now, I haven't written any php for this area of the project.
View Replies !
My.ini Confusion
I installed Mysql 4.1.18 and uninstalled it using add emove programs so I could install 5.0.18. After installing 5.0.18 I opened up the instance configuration Wizard and I still see an instance of 4.1.18. How do I get rid of this instance. Do I need to edit the my.ini file? I also see a file my 2006-02-16 1017.ini.bak? Are both files required? What are the differences between the my.ini file and the ini.bak file?
View Replies !
Joins Confusion
From a table of purchase orders ("purchaseorders"), I would like to identify those orders which were NOT placed on hold. Whether or not a purchase order was placed on hold is kept in a separate "holds" table. The two are linked by a "POindex" field. The following SQL generates the results below (only order 10248 was put on hold): SELECT holds.huser, purchaseorders.poindex FROM purchaseorders LEFT JOIN holds ON (PurchaseOrders.POIndex = Holds.POIndex) where Purchaseorders.poindex > 10240 and Purchaseorders.poindex < 10250 order by poindex asc holds.huser purchaseorders.poindex [Null] 10241 [Null] 10242 [Null] 10243 [Null] 10244 [Null] 10245 [Null] 10247 184 10248 [Null] 10249 But what I really want is a listing of all orders not on hold - in other words: holds.huser purchaseorders.poindex [Null] 10241 [Null] 10242 [Null] 10243 [Null] 10244 [Null] 10245 [Null] 10247 [Null] 10249 I've tried the left join condition where purchaseorders.poindex != holds.poindex, but that does not work. I'm obviously missing something simple but can't figure it out.
View Replies !
GROUP BY Confusion
On our web site (www.doorsopening.net) we have a table of images for each member called member_image with the following fields id member_id title view_count The view count is incremented every time a visitor views the image. I have been working on a query that I just can't get to function as I had hoped. Essentially I would like to be able to get the most viewed images out by member. That is if one member has 5 of the top viewed images then ignore images 2-5 just return the top one and then move onto the next member. I hope that makes sense. Here is what I have so far... SELECT mi.id, mi.member_id, mi.title, MAX(mi.view_count) as view_count FROM member_image mi GROUP BY mi.member_id ORDER BY MAX(mi.view_count) DESC The problem here is that grouping by the view_count means that I always get the first image for that member and not the one with the highest view_count.
View Replies !
Confusion Regarding To Create A Table Or Add One Row
This is with respect to the database which i need to create in SQL Server 2000. Quote: I have 3 tables namely Program_Master, Subject_Master and Topic Master Program_master table consists of Program_id (Primary Key), Program_name, Program_description, Program_Status Subject_master table consists of Subject_id (Primary Key),Program_id ( referring the above Program_id, Subject_name, Subject_description, Subject_Status Topic_master table consists of Topic_id (Primary Key),Subject_id ( referring the above Subject_id, Topic_name, Topic_description, Topic_Status Now this is a database for students joining some programs. The problem is suppose in the start of a new academic year a paritcular progam is changed ie., in a program if a particular subject's topic is changed, the change should not effect the old students enrolled previously but only effect the new joining students. Is it better to create a new duplicate table every year whenever there is any revision of the program or is there any other way out.
View Replies !
Minor Foreign Key Confusion
I have the following tables: SQL CREATE TABLE `ip` ( `ip` int(10) UNSIGNED NOT NULL, `system` varchar(150) NOT NULL, `description` text NOT NULL, `owner` varchar(25) DEFAULT NULL, PRIMARY KEY (`ip`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CREATE TABLE `ping` ( `ping_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `ip` int(10) UNSIGNED NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` tinyint(3) UNSIGNED NOT NULL, PRIMARY KEY (`ping_id`), KEY `FK_ping_1` (`ip`), CONSTRAINT `FK_ping_1` FOREIGN KEY (`ip`) REFERENCES `ip` (`ip`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 I've read and reread the manual and still have a couple of points of confusion: First off, I just want to confirm that I understand correctly - `ping` (where the foreign key is defined) is the child table, and `ip` is the parent table, yes? This is what I want, so please help me correct my table structures if this is not the case. ON DELETE CASCADE: If I understand correctly, if a row in the parent table is deleted, all corresponding rows in the child table are also deleted, correct? Again, this is the behavior I want, so please correct me if I'm wrong. ON UPDATE CASCADE: This is the one I'm having real trouble understanding. From the manual: Quote: Originally Posted by MySQL Manual CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Does this mean that if I update the referenced column in the parent table, all corresponding rows in the child table will update to continue to point to the newly-updated row? Or does it extend to UPDATEs made to other columns in the referenced row, and if so how does that CASCADE?
View Replies !
Confusion About 2 Primary Keys In A Lookup Table
First of all, yes, I'm new to MySQL and working from the Kevin Yank book about building a database driven website! Having reached chapter 5, I have my first encounter with a lookup table which isn't confusing in theory, but I feel I must be missing something as there appears to be a contradicition regarding the use of Primary Keys. To quote relevant snippets from the book: "Designating a column as a Primary Key tells MySQL not to allow two entries in that column to have the same value......In the case of a lookup table, there is no single columnthat we want to force to have unique values. Each joke ID may appear more than once as a joke may belong to more than one category, and each category ID may appear more than once, as a category may contain many jokes. What we don't want to allow is the same pair of values to appear in the table twice......For this reason, we usually create lookup tables with a multi-column primary key as follows: CREATE TABLE jokecategory ( jokeid INT NOT NULL, categoryid INT NOT NULL, PRIMARY KEY(jokeid, categoryid); This creates the table in which the jokeid and categoryid columns together form the primary key." END OF QUOTE The integer values within this lookup table are as follows: --------------------- ¦Jokeid categoryid ¦ 1---------2 ¦ 2---------1 ¦ 3---------4 ¦ 4---------3 ¦ 4---------5 ---------------------- So we have one Primary Key made up from 2 columns. But, are the 2 columns themselves seperately treated as Primary keys? I ask this, because the rules as I see it are, that you can't have two entries in one column that have the same value. Clearly, the jokeid column alone does have two entries of the same value which is why I am thinking there is a contradiction of the rules. I suspect that the answer is that the 2 columns individually have no value as Primary keys and they pair up together to form one Primary key, but being new to this, I just need someone to confirm that there isn't a contradiction to the rules going on!
View Replies !
A Weekly Chart, Datetime Field Confusion
I'm trying to produce a weekly chart on my site. The site holds 4 different genres of music, and I am aiming to produce a function to compile a top 5 chart, which will list the top 5 most played songs in the past 168 hours (7 Days) for whichever genre. I know how the function will look, but it's the SQL query which I'm having trouble with. Here are the SQL tables as they stand. (Only relative fields mentioned) R2M genre song_id artist track plays song_id play_id play_date (datetime field) So to give you an idea of what I'm after, I'm looking to call the function compile_chart($genre), send the genre variable ($genre) and then create the chart. Again, it's only the SQL query which I need help with, I can produce the remainder of the code myself. So I'm trying to SELECT the artist and track from r2m ordering the results by how many plays they have had in the past 168 hours.
View Replies !
Query For Dates
Table Data: ----------- id__name___from_________to_______ ------------------------------------- 1___ABC___2006-10-01___2006-10-31 2___CDE___2006-11-01___2006-11-31 is there a syntax to select both rows at once? i.e. if I query for dates from 2006-10-15 to 2006-11-15, is there a possibility to have the two rows as a result of a single SQL Statement query?
View Replies !
Query Dates
I am trying to find records where my approved date is not NULL and my shipped date is NULL. Using phpMyAdmin the records show cells with italic NULL and others with dates ie. 2006-06-11, so I assume this is formated right. However using this query I get no records. SELECT * FROM records WHERE approved_date != NULL AND shipped_date = NULL I have used phpMyAdmin's search section with every conceivable way and I can't get any proper results.
View Replies !
Query Using Dates
I'm having trouble figuring out how to get two time periods in one query. Basically it's either one month at a time or a full year...So I need to get everything that starts and stops this month, or cases where this month falls between the start and stop dates. I couldn't figure out how to do the between bit, so I settled for calling an expiration date that is not older than this month.I get partially correct results. It's calling the five ads that start on 2006-12-01 and end 2006-12-31, and ignoring the ones that start 2007-01-01 and end 2007-01-31. However, I've got a test ad that starts 2006-01-01 and ends 2006-12-31 that it's ignoring...I think my timeframes are cancelling each other out or something. $sql = "SELECT ad_id, ad_filename,rally,affiliates,past,upcoming,start_date FROM ads WHERE Month(start_date)='$curmonth' AND Year(start_date)='$curyear' OR Month(end_date)>='$curmonth' AND Year(end_date)>='$curyear'ORDER BY rally='y' DESC";
View Replies !
Using Dates To Query
I have a table with a field for each record with a date in it. I want to get all records before September 12,2000 but I don't know what the query should be.
View Replies !
Select Query Between Two Dates
select * from table where Fri, 23 May between sdate and enddate Fri, 23 May is user given date table likes sno | sdate | enddate 1 | Mon, 19 May | Sat, 24 May 2 | Sat, 17 May | Mon, 19 May 3 | Fri, 23 May | Mon, 26 May so the above queries i need the 1 and 3 results only what is the problem in query and how to change it give solutions.
View Replies !
Creating A Query Based On Dates
I am trying to write a query (in PHP) which selects from a database all of the items which are in the future. My query is as follows SELECT * FROM news WHERE ((news.date)>$today ORDER BY date where news is my database, news.date is the the field which holds the date for the item and $today will be replaced my current date. At the moment it seems to display all values, which suggest its not functioning properly.
View Replies !
Looping An Array Of Dates In One Query
$newdates is a simple array of dates (like 2008-10-01) the 'comm' column is decimal 2 places 'trans_date' is a datetime column PHP Code: foreach($newdates as $newdate){     $linequery = "SELECT SUM(comm) AS `linecomm` FROM `table` WHERE DATE(trans_date) = '" . $newdate . "'"; $lineresult = mysql_query($linequery) or die("Could not execute comm totals query" . mysql_error());     $row2 = mysql_fetch_row($lineresult);     array_push($data_1, $row2[0]); }Â
View Replies !
Query Dates Within 1 Week From A Date
I'm fairly new to PHP and have done some basic work with mysql but am not sure how to approach this. I'm trying to figure out how to create a query with PHP to get all rows with a datetime from 1 week ago to the current timedate. Note: I'm also not sure how to find a date for 1 week ago with PHP. Any help would be great.
View Replies !
Comparing Dates Y, M, D , Time In Sql Query
ok.. ive finally got my nice little calender setup to output my dates now how do i query my database for example ive got 2 variables $startdate = 2006-1-1 00:00:01 $enddate = 2006-1-1 23:59:59 these represent the 1st and last second of the first of january 2006 i have a cell in my table (table called challenges) ( cell called time) that contains a date in the same format for each entry how do i get all the entries between the start time and the end time.. can i use less than < and more than > as these are not really integar values the column type is datetime but there is also another column of type datetime
View Replies !
Converting MS Access Dates To MySQL Dates During LOAD DATA INPUT ?
My insert code is below. The MySQL server is on my local machine and is version 4.1.22. I am exporting from an access table with 6 fields to a mysql table with those 6 plus 5 more fields. The main problem I am having SO FAR, is converting dates. The data file dates are formated like: 2/2/2006 0:00:00, 12/20/2006 9:22:05 Any ideas how to format those into mysql friendly dates? Also, how do I convert currency fields in the load data process? I know you use SET by what kind of formula? =========================================== LOAD DATA INFILE 'C:Documents and Settingspath_to_filedata.txt' INTO TABLE auto (field2, field3, field4, field5, currency_field6, field7, date_field8, date_field9) SET id = MD5(UUID()) FIELDS TERMINATED BY ',' LINES TERMINATED BY ' '
View Replies !
Update String Dates Into Mysql Dates
I've got a table that someone created with varchar fields for month, day, and year. I've added a DATE field to the table, and now I want to combine all three of these strings into one DATE and stick it into the DATE field. Once I've got this done, I can delete those three varchar fields and just have the nice DATE field. Here's the command I've tried in several variations but no luck--syntax errors every time: UPDATE SET OCR_Entry_Date = date_format(str_to_date(concat_ws('-', OCR_MM, OCR_DD , OCR_YYYY) ,"%b-%d-%Y"), "%m-%d-%Y") WHERE OCR_YYYY = '1974' OCR_Entry_Date is a DATE field and the others are the varchar fields. My logic is basically: 1. concatenate the separate field values into a single string 2. convert the string into a date 3. format the date in the way I'd like it in the table
View Replies !
MSSQL Dates -> MySQL Dates Automatically?
We're using data feeds that were originally meant for MS SQL and the dates in the data feed (tab delimited text files) are formated like: Oct 21 2007 In MySQL, the date fields are formatted as datetime fields and when we do an import the dates all come through as 0000-00-00 00:00:00. We're importing using the MySQL "LOAD DATA LOCAL INFILE" command and just dumping the text files right into freshly truncated tables. Is there a way when loading the files to find and replace the dates maybe? Can MySQL convert the dates? I have a shell script downloading an archive and uncompressing, then it runs a PHP script that loops through the files runningt he LOAD DATA command. Any advice would be appreciated... I'm just looking for the easiest (and least server-intensive) way to get the date issue fixed. We've already tried begging the vendor but they're not yet ready to start supporting other date formats (even though their MS SQL db can output a date format friendly to MySQL). Thanks!
View Replies !
List All Dates Between 2 Diff Dates
I have a database which stored financial data daily exclude weekend, however sometimes i tend to forget to upload data into the database. How do i write a sql query that would detect the missing dates between from last updated date until the current date.
View Replies !
Dates Pre 1970 And Dates After 2050
i have MySQL version: 4.1.16-nt, when i try to insert a date pre 1970 or after 2050 into a timestamp field, the date is stored as all 0's, how can i save a date pre 1970 and after 2050 into a mysql field?
View Replies !
List All The Dates Between 2 Given Dates Using SELECT
how I can list all the dates between 2 dates (inclusive) using SELECT sql statement in mysql? I have a member table with the following columns: id int autoincrement name varchar(40) join_date date I want the following output (date, count of members joined on that date): 1 April 2009...... (2 members joined) 2 April 2009...... (0 members joined) 3 April 2009...... (3 members joined) .....so on ...upto 30 April 2009.....(1 members joined) For the above output I need the SQL command that is valid in mysql. Is there anyone who can produce the above result with a single SELECT command. Please don't suggest that is possible using php for loop or creating a mysqlorary table first and then inserting all the dates into it. Then make a join between mysql table and members table using date as GROUP by column etc. etc. I know this is possible using some user variables as I searched through the various SQL tutorial sites. But I am unable to figure out how I can produce a list of all dates between 2 given dates.
View Replies !
Stroring Dates Perior To 1 AD, BC Dates
I need to store some dates that can be BC, However I received a problem indicating Incorrect Datetime. I have read the documentation, and it says that Date&DateTime types can store from 1000-9999 AD, and Timestamp stores less year ranges. What other options do I have to store dates before 1000 AD !
View Replies !
How To List All Missing Dates Between 2 Dates
I have a database which stored financial data daily exclude weekend, however sometimes i tend to forget to upload data into the database. How do i write a sql query that would detect the missing dates between from last updated date until the current date.
View Replies !
Dates, Dates, Dates - Syntax Help Please!
OK, I have a MySQL table which contains, among others, a field called date which stores dates in the format YYYY-MM-DD HH:MM:SS. What I'd like to do is select a list of all the months present (without repetition), preferably in the format YYYY-mm
View Replies !
Using Between For Dates
I use a query like this: [MYSQL]AND `updatedate` BETWEEN '2008-10-26' AND '2008-11-01'[/MYSQL] While that works, it does not display the records on Nov 1. I could use this: [MYSQL]AND `updatedate` BETWEEN '2008-10-26' AND '2008-11-02'[/MYSQL] but that includes all of the records on both Nov 1 and Nov 2. Anyway, how to get it only display records that have dates from Sept 26 to Nov 1 and excluding the rest?
View Replies !
Dates Between Dates
Is it possible to query dates between two dates straight from mysql database? Example: I have two dates in my database that function as start of an event and end of an event. I can get results when I seek an event that starts 2006-07-30 and ends at 2006-08-06 with following sql-query: select eventid from database where (startdate between '2006-07-30' and '2006-08-06') or (enddate between '2006-07-30' and '2006-08-06'); Or by using any date values that go "over" the specified dates in database. Problem is that I would like to get the event also when it's active between these dates. Like from 2006-07-31 to 2006-08-02, but no result will be returned with this example query: select eventid from database where (startdate between '2006-07-31' and '2006-08-02') or (enddate between '2006-07-31' and '2006-08-02');
View Replies !
BETWEEN Two Dates
I am making a calendar function in php and i need to know if an appointment already exists between two dates. I am trying to use some like below but with no avail, any other ideas? SELECT id FROM appoit WHERE UNIX_TIMESTAMP(day) BETWEEN '$date' AND '$until' AND room='$room' Note: `day` is actaully stored as a datetime value $date is the wished start date and time in the format of php's mktime $until - as above but when the appointment will end
View Replies !
When Should I Use Int For Dates?
I'm thinking about storing dates in my databases as unix timestamps in int fields. Since I use PHP I'm thinking it would be convenient to have timestamps rather than datetime fields. But someone told me I can't store dates earlier than 1970 as timestamps. So do I have to decide from application to application if I expect to be using dates earlier than 1970, or is there a way around this rule?
View Replies !
Dates Between
I want to write a query that gets all the dates between 2 specific days (not the difference between them).
View Replies !
Between Dates
SELECT * FROM Bookings WHERE PropertyID = 1 AND ((StartDate BETWEEN 1122854400 AND 1125532799 )OR (EndDate BETWEEN 1122854400 AND 1125532799)) Thats my SQL statement, this is my end date 1124037406 which unless my maths is failing me, is between the 2 values but my sql query returns no results.
View Replies !
BETWEEN X AND X For Dates
I'm trying to find all records that fall between two dates. BETWEEN only seems to be for integers so I was wondering there was a similar construct for dates.
View Replies !
Dates In SQL??
I'm having some trouble with dates in MySQL. I'm developing a site that has an area for news. I've created a table that's called NEWS and it has 3 columns: id, date, news_text. For the date I've given these properties: datatype:timestamp, default:current_timestamp. The problem arises when I retrieve the news. I want the date to be printed as well in the form of YYYY-MM-DD, but I guess due to the current_timestamp, I get YYYY-MM-DD HH:MM:SS. 1) Is there a way to ommit the time?? 2) How can I change the format and make it DD-MM-YYYY??
View Replies !
List Of Dates
i need a jsp program code for date generation.(mssql-back end) Fields are fromdate and todate both field are datetime datatype. Button:-save,cancel,exit both dates are given by the user how to generate the date between these two date. ie.lists of date between the fromdate and todate with datatype datetime
View Replies !
Average Between Two Dates
I am trying to figure out how to find the avg in between two dates in the work_date field. For example, let's say I want the avg from 2007-01-24 to 2007-05-06, I would have to find the avg by taking the values in the daily_typing_pages columns and add up all the columns between the the dates provided. (E.G. (100+220+350+250+170)/5).
View Replies !
Add Dates In Loop
but I can´t get it to work. I have an table with columns named like this: 2004-12-01, 2004-12-02 and so on, So I need to get the dates between two dates and update with the new values the columns with the same name as the dates I got. $date = 2004-12-01; $enddate = 2004-12-10; for($date<=$enddate; $sSQL++ { $sSQL = "SELECT DATE_ADD('$date', INTERVAL 1 DAY) date"; $sSQL = mysql_query($sSQL); echo "$date"; then I should update my table like this: $sSQLsql = mysql_query("UPDATE `disponibilidad` SET `$s` = 'w' WHERE `property` = 'Banana_Beach_3' ");
View Replies !
Compare Two Dates
I have a field in my database called rntl_date and this contain the date when the apartment will be available. I want to compare this with Curdate() and if this is less then Curdate() to show Availabe For example: rntl_data curdate() 2004-12-12 2005-10-10 ->Available 2006-12-12 2005-10-10 ->Non available
View Replies !
Formated Dates
Here is my dilemma.I have 2 date formats. One is in the format of 2006-07-11 and the other in 7/7/2006 for example. I need to pull data from MySQL withing a certain date range or where a date matches a certain criteria. So my question is if it is possible to compare different date formats like the ones above when executing a query in MySQL.
View Replies !
Finding All Dates Where The Value Changes
Example_ID Example_DateAndTime Example_Value This table currently has > 1,000,000 rows (and at least 10 other columns). The Example_DateAndTime column is different on almost all rows. The Example_Value column is quite often the same (changing less than once a day).
View Replies !
Finding Dates
I want to pull up all entries in the database with a date that is either today or before today: Code: SELECT * FROM `invoices` WHERE `date` <= '2005-08-01' This doesn't work ... what am I doing wrong?
View Replies !
Dates Prior
I'm working on a database of biographies and most of these people lived prior to 1969 ... Is there some secret? Or do I just have to make the field a VARCHAR instead of DATE?
View Replies !
Storing Dates
i'm currently working on a small php program to store details of petrol receipts. The part i'm stuck on is which field type to use to store the date. And then how to order the dates. i need to order by year then month and then day. I have no idea how to sort dates and need to be able to add receipts in any order. *edit* the date i want to store is in the format DD.MM.YYYY the date is created via pull down menu's
View Replies !
Jobs Between Two Dates
I was wondering if any of you could tell me is this statment will work. I have been running it but not getting any errors but not really getting results I would like. SELECT * FROM jobs WHERE P_date BETWEEN ('2007/01/22') AND ('2007/01/20') AND MA = 'true' AND Job_State = 'Open' AND (S='true' OR W='true' OR F='true') ORDER BY D_date I'm trying to get jobs between two dates with a lot of other AND's in there. Thank you for your time and effort in helping me with this, I hope my code has not caused you to much pain
View Replies !
Function For 2 Dates
i have inserted 2 dates say "2008-01-01" and "2008-01-05", I want the return to be "2008-01-01", "2008-01-02", "2008-01-03", "2008-01-04", "2008-01-05" . Is there a mysql function or need a custom function? IF so, can you provide some reference ?
View Replies !
|