Kim Madsen wrote:
But Skip, as the others say, use a date class, since you're passing a
php var on to the SQL anyway, then you could determine the exact days
from start to end of donation. Combine this with to_days and you have
your solution
Yes, this sounds like the best way to go.
Than
Michael A. Peters wrote on 26/01/2010 06:04:
I use seconds from epoch in the database simply because it works so well
with the php date() function.
If you need something where Julian day really is better, I assume it
isn't that hard to convert between posix and julian day, though it seems
od
At 9:54 PM -0600 1/25/10, Skip Evans wrote:
Hey all,
I have an SQL query that's stumping me.
I have two date variables, $start and $end that are in mm/dd/
format and two database fields, start_date and no_donations. The
start date is mm/dd/ format and no_donations is an integer that
Michael A. Peters wrote:
If you need something where Julian day really is better, I assume it
isn't that hard to convert between posix and julian day, though it seems
odd to me that it isn't part of the date() function. It probably should be.
Looks like unixtojd() and jdtounix() do it.
-
Paul M Foster wrote:
Typically, coders try to store dates in unix timestamps internally, and
then add 86400 seconds for every day to calculate intervals and such.
This is often inaccurate. Julian days are far more accurate.)
Paul
I use seconds from epoch in the database simply because it wor
On Mon, Jan 25, 2010 at 09:54:40PM -0600, Skip Evans wrote:
> Hey all,
>
> I have an SQL query that's stumping me.
>
> I have two date variables, $start and $end that are in
> mm/dd/ format and two database fields, start_date and
> no_donations. The start date is mm/dd/ format and
> no_don
William Stokes wrote:
Hello,
This is not a php but sql question. My apologies but I don't know any good
sql forums and I know that someone here might be able to answer.
OK so the question is. How to make a SELECT query with WHERE definition that
requires 2 conditions to be satisfied so that the
On Thu, 7 Apr 2005, William Stokes wrote:
Hello,
This is not a php but sql question. My apologies but I don't know any good
sql forums and I know that someone here might be able to answer.
OK so the question is. How to make a SELECT query with WHERE definition that
requires 2 conditions to be satis
if i understand you question...
SELECT columns
FROM table
WHERE (condition #1) AND (condition #2);
You can add many conditions. There are many ways to do this. This one is
probably the most simple for only two conditions. Depending on your
needs you also may need to create a subquery.
SELECT col
What about trying it first?
Diana Castillo wrote:
If I have a date in unix format in a numeric field in my table (Mysql) and I
want to compare it to a date which is in unixformat also, will the query
work like this?
"SELECT from tarifs where unix_from_date<=".$dateinunixformat
--
PHP General
select * from table_name where (start_date >='2002-10-01' and start_date
<='2002-12-10') or (end_date >='2002-10-01' and end_date <='2002-12-10')
At 01:08 11.12.2002, [-^-!-%- said:
[snip]
>
>Hello everyone,
>
>I need to get a recordset between two dates, a
On Thu, 28 Mar 2002, Sebastian A. wrote:
> When you say "ORDER BY that", is it also possible to do that via letters
> such as ORDER BY 'S', because from what I understand, ORDER BY has to be
> a column.
The object of "order by" should be something that changes for each row, or
else the statement
On Friday 29 March 2002 00:30, Sebastian A. wrote:
> When you say "ORDER BY that", is it also possible to do that via letters
> such as ORDER BY 'S', because from what I understand, ORDER BY has to be a
> column.
In my example, 'this', 'that', 'the', & 'other' are all columns. So yes,
ORDER BY x
to:[EMAIL PROTECTED]]
>Sent: Thursday, March 28, 2002 3:49 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] SQL Question
>
>On Thursday 28 March 2002 22:34, Sebastian A. wrote:
>> How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
>> example say I wan
To: [EMAIL PROTECTED]
Subject: Re: [PHP] SQL Question
On Thursday 28 March 2002 22:34, Sebastian A. wrote:
> How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
> example say I wanted to list all my users alphabetically. How would I do
> this? Or say I had a form and
On Thursday 28 March 2002 22:34, Sebastian A. wrote:
> How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
> example say I wanted to list all my users alphabetically. How would I do
> this? Or say I had a form and I wanted to present the content to the user
> *AFTER* they have
> How do I sort out data from mysql_fetch_row() or mysql_fetch_array? For
> example say I wanted to list all my users alphabetically. How would I do
> this?
You would sort in your SQL statement, not PHP.
SELECT * FROM my table ORDER BY field_name;
> Or say I had a form and I wanted to present t
3:04 PM
To: Wolf-Dietrich von Loeffelholz; [EMAIL PROTECTED]
Subject: Re: [PHP] sql question
select * from tbl_lit where lit_source like "c%"
Janet
- Original Message -
From: "Wolf-Dietrich von Loeffelholz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
select * from tbl_lit where lit_source like "c%"
Janet
- Original Message -
From: "Wolf-Dietrich von Loeffelholz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 12:09 PM
Subject: [PHP] sql question
i want that a select query display me all words beginning
Hi do you care about case sensitivity?
Nathan Cassano <[EMAIL PROTECTED]> wrote:
select * from tbl_lit where lit_source like 'c%';
Check out http://www.sqlcourse.com/
-Original Message-
From: Wolf-Dietrich von Loeffelholz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 1
select * from tbl_lit where lit_source like 'c%';
Check out http://www.sqlcourse.com/
-Original Message-
From: Wolf-Dietrich von Loeffelholz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 12:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] sql question
i want that a select quer
"John LYC" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi all,
>
> does mysql support this?
>
> select * from tablename where id in (select id from table2 where cond)
>
> thanks
>
No. MySQL does not support so-called sub-selects. Here's an easy workaround
i
22 matches
Mail list logo