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
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 represents the number of
months from start_d
What do you want to do? for eg?
Shi MuQi
LangFang ABC (China) °v°
Tel:(86)-316-68382!^ /(_)\
E-mail:[EMAIL PROTECTED] ^ ^
"William Stokes" <[EMAIL PROTECTED]> 写于 2005-04-08 01:23:39:
> Hello,
>
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
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 row gets selected?
M
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
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 Mailing List (http://www.php.net/)
To unsubscribe,
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
Hello everyone,
I need to get a recordset between two dates, and am having a little
trouble. I was wondering if someone could me make it more efficient.
The goal:
Each record has a start_date and end_date field. I want to be able to
extract records that has the start_date and/or end_date, withi
My following query :
insert into acteursenc (nuacteur,nomacteur)
(select AA, BB from
(select max(nuacteur)+1 AA from acteursenc),
(select 'Michael Sweeney' BB from acteursenc))"
produces an ORA-1: unique constraint error.
The prima
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
/validate the
data. Then, you'd write to the database.
-Original Message-
From: Sebastian A. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 8:35 AM
To: PHP General List (PHP.NET)
Subject: [PHP] SQL Question
How do I sort out data from mysql_fetch_row() or mysql_fetch_array? F
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 filled it out so that they can check for mistakes.
Mysql_fetc
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 quer
January 15, 2002 12:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] sql question
i want that a select query display me all words beginning with an a ..
like select * from tbl_lit where lit_source = 'c*' ..
thnx bSue
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-m
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 tha
i want that a select query display me all words beginning with an a ..
like select * from tbl_lit where lit_source = c* ..
thnx bSue
if I give the user a search and he enters 'cat dog' I am going to want to
find all the results that have the word 'cat' or 'dog' in them, but I want
all the results that have 'cat' and 'dog' at the beginning of the results
because these would be more relevent. now how I see it is this, it aint
pre
"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
hi all,
does mysql support this?
select * from tablename where id in (select id from table2 where cond)
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e
32 matches
Mail list logo