Is there a way in the query below that the “LEFT OUTER JOIN” connects with only
the most recently added entry in `verse_of_the_day_Bible_trivia` for each
category ( `verse_of_the_day_Bible_trivia`.`Bible_trivia_category_reference` )
based on the column `verse_of_the_day_Bible_trivia`.`date_adde
Philip Thompson wrote:
On Dec 9, 2009, at 12:58 PM, h...@deweywilliams.com wrote:
The only SELECT is on MAX('timestamp'). There is really nothing to Group BY in
this query.
Dewey
Philip Thompson wrote:
Hi.
In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using
EXPLA
On Dec 9, 2009, at 12:58 PM, h...@deweywilliams.com wrote:
> The only SELECT is on MAX('timestamp'). There is really nothing to Group BY
> in this query.
>
> Dewey
>
> Philip Thompson wrote:
>> Hi.
>>
>> In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using
>> EXPLAIN
The only SELECT is on MAX('timestamp'). There is really nothing to
Group BY in this query.
Dewey
Philip Thompson wrote:
Hi.
In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using
EXPLAIN on one of my queries, I noticed no change between having indexed by GROUP BY
fiel
Also you may not see a difference because your not even using
'History_field' anywhere in your SELECT statement. I am a little surprised
that you didn't receive a error.
On Wed, Dec 9, 2009 at 9:31 AM, Juan Pablo Ramirez <
ramirez.juanpa...@gmail.com> wrote:
> Hi i recommend always use indexes wh
Hi i recommend always use indexes when programming. developers tend not
to.. and when the databases grows it's difficult to modify or make them
modify the code.
El mié, 09-12-2009 a las 14:22 -0300, Julio Araya escribió:
> On Wed, Dec 9, 2009 at 12:52 PM, Philip Thompson
> wrote:
> > Hi.
> >
>
On Wed, Dec 9, 2009 at 12:52 PM, Philip Thompson wrote:
> Hi.
>
> In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using
> EXPLAIN on one of my queries, I noticed no change between having indexed by
> GROUP BY field and not indexing it. Any thoughts would be appreciated.
>
Hi.
In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using
EXPLAIN on one of my queries, I noticed no change between having indexed by
GROUP BY field and not indexing it. Any thoughts would be appreciated.
In this example, should `history_field` be indexed...?
SELECT MAX(
To: "Chris"
Cc: "Ron Piggott" ;
Sent: Monday, August 17, 2009 6:00 AM
Subject: Re: [PHP-DB] GROUP BY
ASC after GROUP BY ?? didn't mysql throw an error ?
No virus found in
ASC after GROUP BY ?? didn't mysql throw an error ?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ron Piggott wrote:
I run a once daily e-mail list.
The users are able to choose the time of day they receive their daily e-mail.
Their preference is stored in the email-delivery_hour field.
I am trying to determine which email_delivery_hour between 0 and 6 has the
lowest number of subscriber
I run a once daily e-mail list.
The users are able to choose the time of day they receive their daily e-mail.
Their preference is stored in the email-delivery_hour field.
I am trying to determine which email_delivery_hour between 0 and 6 has the
lowest number of subscribers. (I am trying to m
I have never used the DISTINCT clause, so I won't attempt to help in any
detail, but look it up in the manual. I think it will help you.
Regards ... Ross
Larry Sandwick wrote:
Can you help me with this query below Mgr's could circumvent the process by
login 20 times in 1 day and change the l
Can you help me with this query below Mgr's could circumvent the process by
login 20 times in 1 day and change the login attempts. This is a rolling 30
window my upper mgmt would like to track.
select user, count(user) as num from LoginTrack
where user and t='M' and DATE_SUB(CURDATE(),INTER
Can you help me with this query below Mgr's could circumvent the process by
login 20 times in 1 day and change the login attempts. This is a rolling 30
window my upper mgmt would like to track.
select user, count(user) as num from LoginTrack
where user and t='M' and DATE_SUB(CU
Hello,
Let's say I have an app used in car garages. I have two tables:
table cars
id
make
model
table work_done
id
carid
details
work_date
I need to pull out the last work order for each car. This pulls them all:
select c.make, c.model, c.id, wd.details from cars c join work_done wd
on wd.car
.
Is there anything preventing you from palying with the data and manipulating
it on the way into your site? Trying to make the virtual column in to a real
column that could provide the geo reference for future queries.
Bastien
From: "Chris Payne" <[EMAIL PROTECTED]>
To:
Subject:
Chris Payne wrote:
Hi there,
The problem is, the database is imported from a huge properties database and
can only be imported in the format from the central database of estate
agents, so I can't reformat it in the tables itself.
Each table has the same fields, but one is for condo's, one is for
yo
tien
>From: "Chris Payne" <[EMAIL PROTECTED]>
>To:
>Subject: [PHP-DB] GROUP BY? Urgent help needed with selection list
>Date: Sun, 23 Jan 2005 00:46:18 -0500
>
>Hi there everyone,
>
>
>
>I’m using the following code to populate c
if you have kind of geo id number you could use that, failing to have that
info, you could re-arrange the data to have Akron - Central, Akron - SE (so
that all is in a standard format)
Bastien
From: "Chris Payne" <[EMAIL PROTECTED]>
To:
Subject: [PHP-DB] GROUP BY? Urgent
Well, first of all.. your subject line mentions GROUP BY which is a database
function for telling the query what to use when performing aggregate functions
like sum, count, average, etc type functions.
That's really not what you're looking at doing here it sounds like. Sounds
like you just wa
Hi there everyone,
I’m using the following code to populate cities from a huge database:
Show All
This works great, no problems BUT the client now needs is so the cities are
grouped
On Sun, Mar 16, 2003 at 08:02:02AM +, Daniel Harik wrote:
> Hello,
>
> Guys i try to join to tables
>
> slides:
> id
> userid
> file
> moment
>
> users
> id
> username
>
> As there few slids per user and i want to get only last one, i use following
> sql query, but it fetches me first slid
Hello,
Guys i try to join to tables
slides:
id
userid
file
moment
users
id
username
As there few slids per user and i want to get only last one, i use following
sql query, but it fetches me first slide. How can i make it fetch last one
please?
SELECT slides.file, slides.moment, users.id, us
> How can I get mySQL to group stuff by the day? my date
> coloumn is a UNIX
> timestamp.
SELECT whatever FROM my_table GROUP BY FROM_UNIXTIME(timestamp_col,
'%Y-%m-%d')
Regards
Joakim
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How can I get mySQL to group stuff by the day? my date coloumn is a UNIX
timestamp.
--
JJ Harrison
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Howdy DL & Jason,
I didn't see your response Jason until DL cc'd me this note. Sorry I
didn't check back to follow-up on the newsgroup.. I thought I had the
answer (well I had one, but not quite the right one)..
Dl Neil wrote:
> Sorry, I haven't been keeping close track of the list - fortunat
Howdy DL & Jason,
I didn't see your response Jason until DL cc'd me this note. Sorry I
didn't check back to follow-up on the newsgroup.. I thought I had the
answer (well I had one, but not quite the right one)..
Dl Neil wrote:
> Sorry, I haven't been keeping close track of the list - fortun
DL Neil" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 11 January 2002 20:21
Subject: Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently
> It may have been obvious to many, but I stumbled across the solution
> (eventually)..
>
> Changing the while state
t;Month: " . date ("F", mktime(0,0,0,$InvMonth[$i],1,2002))
> . " Number of Invoices: " . $InvCount[$i] .
> "";
> ++$i;
> }
>
> RESULTS:
> Month: November Number of Invoices: 17
> Month: December Number of Invoices: 22
> Month: Janu
On Saturday 12 January 2002 00:20, Mike Gifford wrote:
> Hello,
>
> Thanks for your quick reply.. I'm trying to improve the stats feature
> for gcdb (a pretty decent little PHP/MySQL accounting package on SF.net)
>
> On Fri, 2002-01-11 at 05:24, DL Neil wrote:
> > Have you posted all of the relev
ary Number of Invoices: 15
I can't see the bug in the PHP I've got, but there certainly must be
one..
Any suggestions would be appreciated!
Mike
> - Original Message -
> From: "Mike Gifford" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sen
?
Please advise,
=dn
- Original Message -
From: "Mike Gifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 11 January 2002 08:12
Subject: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently
> Hello
>
> I've got the following SQL Q
Hello
I've got the following SQL Query, which consistently pulls up only 3 out
of 4 months from the database:
$sql = " SELECT COUNT(DateBilled) AS count, MONTH(DateBilled) AS
BilledMonth, YEAR(DateBilled) AS BilledYear FROM Invoices GROUP BY
MONTH(DateBilled) ORDER BY DateBilled ASC";
This r
On Mié 28 Nov 2001 19:42, you wrote:
> Can the SUM keyword in SELECT be generalized to strings?
>
> A tipical use for the SUM keyword is:
>
> SELECT column1, SUM(column2)
> FROM table
> GROUP BY column1
>
> This works only if column2 contains numbers (and SUM is the mathematical
> sum)
Can the SUM keyword in SELECT be generalized to strings?
A tipical use for the SUM keyword is:
SELECT column1, SUM(column2)
FROM table
GROUP BY column1
This works only if column2 contains numbers (and SUM is the mathematical
sum).
What about obtain the same behaviour, when column2
- Original Message -
From: "Sharif Islam" <[EMAIL PROTECTED]>
To: "Hugh Bothwell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 11:50 AM
Subject: Re: [PHP-DB] Re: Group By problem
> But its displaying the same as my code:
The SQL was just for reference, to
I am trying to caregorize to group at the same time, but its not working.
Any hints?
Here's my code:
$temp="Dummy";
while ($row = mysql_fetch_array($result))
{
if($temp !=$row["group_name"]){
$temp=$row["group_name"] ;
echo "Group:$temp";
}
$temp1="blah";
if($temp1 !=$row["service_cat"]){
$te
38 matches
Mail list logo