You are a genius and I'm a moron!!!!  Duh ...  I put a GROUP BY in there!!!
So since all three designs were in the same group, it only showed one!!!  I
didn't mean to make it a GROUP BY for the catcode, I meant to do an ORDER BY
the catcode then designfile  .... see that's what I get for being a greenie
.... you get so focused on what you think is the problem that you totally
lose site of the fact that the problem is something totally different ....
thanks for helping me take my blinders off!!

Renee :)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 2:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Selecting from mySql database regarding dates



What happens if you statically set the dates in your query such as this:

SELECT * FROM designs, appliquetable, puffyfoamtable WHERE
designs.designadddate <= '2003-03-03' AND
designs.designadddate >= '2003-02-17';

(For the sake of solving the date problem I simplified the query to isolate
the issue and make sure that really -is- where the issue lies. If this
returned properly I would then modify the dates to use the dynamic variables
you have been using and then slowly fade the rest back in and see where it
breaks down. Oh... and I don't see any reason to have brackets around your
<= and >= comparisons...)

Jason

----- Original Message -----
From: "Stitchin'" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 12:01 PM
Subject: Selecting from mySql database regarding dates


> I have a column in my mySql database that holds a date that I've added
each
> record called
>
> designadddate
>
> I'm trying to create a filter to only pull up the records that have been
> added over the last two weeks. This is my code ... I added the echo for
the
> $today and $twoweeksago variables to make sure something was being
> calculated, they are showing up correct as 2003-03-03 and 2003-02-17 ...
but
> it isn't pulling up any records -- it's not bombing out and giving me the
> Couldn't execute query message - but I know there's three records that I
> made sure had dates in between this range.  I also tried using BETWEEN and
> it didn't seem to work either.
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>   $today = date ("Y-m-d");
>   $twoweeksago = date("Y-m-d",mktime(0,0,0,date(m), date(d)-14, date(Y)));
>
> echo"$today\n";
> echo"$twoweeksago\n";
>
>   /* Select designs of the given type */
>   $query = "SELECT * FROM designs, appliquetable, puffyfoamtable WHERE
>             designs.puffyfoam = puffyfoamtable.puffyfoam AND
>             designs.applique = appliquetable.applique AND
>            (designs.designadddate <= $today AND
>             designs.designadddate >= $twoweeksago)GROUP BY
>             catcode ORDER BY designfile";
>   $result = mysql_query($query)
>        or die ("Couldn't execute query.");
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> Any help would me much appreciated!
>
> TIA
> Renee Toth
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to