Yes, I'm using PHP.

I tried this, but then it doesn't display the way I want it to. How can I
break apart what mysql spits out back into the year, month, day, time
variables?

Thanks,
Jake


----- Original Message -----
From: "Dave Reed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 8:11 AM
Subject: Re: MySQL Question


> > From: "Jake McHenry" <[EMAIL PROTECTED]>
> >
> > This is exactly what I'm doing! Here is my query ..
> >
> > select * from $dbtable where 1 and year = '$inyear' and month like
> > '$inmonth' and day = '$inday' order by time, ampm
> >
> > And when I display the results, it is putting a event of 10:00 am or pm
> > before 2-9 am or pm. it's putting the 10 before all.
> >
> >
> > Here is a screen shot of the output..
> >
> >       Time AM/PM Event Delete
> >       10:00 AM test
> >       10:00 PM test
> >       1:00 PM test
> >       5:00 AM test
> >       8:00 PM test
> >       9:00 AM test
> >       9:30 AM test
> >
> >             Check All
> >         Password:
> >
> >
> > Thanks,
> > Jake
>
>
> You're either going to have to write your own sort that takes into
> account the leading one or do it the right way :-) with MySQL
> date/time data types.
>
> Obviously you're doing this with some sort of programming language so
> write the code to generate the query based on the date you want to
> search for:
>
> Python example:
> date = year + '-' + month + '-' + day
> q = 'select * from dbtable where date_column = ' + date + \
>     ' order by time_column;'
>
> Replace your date data types with a MySQL DATE and a MySQL TIME data
> type.
>
> HTH,
> Dave
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
>




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to