The situation is somewhat hard to describe, so please bare with me:
I am trying to group my results by the last activity on each row, my query
looks like this
select text, dt, item_id from table
where
group by item_id
order by dt DESC
here is an example record set.
text1,2006-06-28 10:00
also, i would check that the user you are using for your mysql_connect in
php has the permissions to do the create table, etc.
On 7/2/06, Daniel Kasak <[EMAIL PROTECTED]> wrote:
Brian Menke wrote:
> MySQL version 5.0.16
>
> Windows XP
>
> PHP 5.
>
>
>
> I have this query that when I run it in
so i am doing a query on an enum field:
when i do this query:
select *, id as vid, user_id as uid from video where (file_complete =
'true') order by undt desc limit 0,10;
the results are 0.16 or 0.17 seconds.
instead of saying file_complete = 'true. if i say file_complete != to the
other 5 poss
bout 10x as many records with true than
with anything else.
On 7/4/06, John Hicks <[EMAIL PROTECTED]> wrote:
Tanner Postert wrote:
> so i am doing a query on an enum field:
> when i do this query:
>
> select *, id as vid, user_id as uid from video where (file_complete =
>
1.dt < t2.dt
WHERE t2.item_id IS NULL;
PB
-
Tanner Postert wrote:
The situation is somewhat hard to describe, so please bare with me:
I am trying to group my results by the last activity on each row, my query
looks like this
select text, dt, item_id from table
where
group by item
AS t2 ON t1.item_id = t2.item_id AND t1.dt < t2.dt
WHERE t2.item_id IS NULL;
amazing what a little set of parenthesis will do. thanks anyways.
On 7/18/06, Tanner Postert <[EMAIL PROTECTED]> wrote:
the below query worked great in mysql 3.23, but we just moved to 5.0 and
it broke, i
ok, here is the schema that I am working with:
CREATE TABLE `cd` (
`id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL,
`title` varchar(100) NOT NULL,
`description` text NOT NULL,
`dt` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM
CREATE TABLE `song
that you want to sell.
-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 02, 2006 2:13 PM
To: Tanner Postert; mysql@lists.mysql.com
Subject: Re: Is this query possible?
I'm not sure why you split out track, track is really kind of an attribute
the query works, but i need to get the total number of songs on that CD, as
well as the sum of the lengths of the songs on the CD... is that possible in
1 query?
On 8/2/06, Tanner Postert <[EMAIL PROTECTED]> wrote:
just to clarify to Brent, the songs lists the original artist and album.
so i have a record set:
id user text
1 2 ...
2 6 ...
3 2 ...
4 4 ...
5 2 ...
6 8 ...
7 1 ...
8 8 ...
9 2 ...
so lets say I am looking at record 3. i need to know the previous record in
the table that has that user, as well as the next record in the table that
has that user.
r
so if i have a list of records...
id name other
1 water H2O
2 water aqua
3 water liquid
so i want to select other where name = 'water'
but i want to only return 1 result, and for that result to be a random
value. is there a way to sort by rand() ? or something similar? or am i
better of ju
sorry for the double post.
if i want to have a row of about 100 records. and everytime i insert a new
record, it gets pushed on the top, and the bottom one gets pushed out, sort
of like a heap. is this possible?
i know i can just delete the record, etc, but i was wondering if there was a
built i
there are ton of these files in my mysql data directory on fedora core 5
they are about a GB a piece.
it appears that they are snapshots or some kind of log file. what is
creating these files?
how many is too many?
i have a field with 21 possible values. each of the values are only 2 or 3
letter strings, but that seems like a lot, would it be faster/more efficient
to put them in a separate table and just join?
I have the following 2 tables:
CREATE TABLE media (
id int(10) unsigned NOT NULL auto_increment,
user_id int(10) unsigned default NULL,
title varchar(255) NOT NULL,
description text NOT NULL,
`hash` varchar(255) NOT NULL,
length float(9,2) NOT NULL,
created timestamp NOT NULL default
I have the following table:
--
-- Table structure for table 'media'
--
CREATE TABLE media (
id int(10) unsigned NOT NULL auto_increment,
user_id int(10) unsigned default NULL,
title varchar(255) NOT NULL,
description text NOT NULL,
`hash` varchar(255) NOT NULL,
length float(9,2) NOT
Is it possible for mysql to return the mathmatical mode of a record set?
(the record that occurs most often)
i'm using the following query:
REPLACE INTO vviews_total(
SELECT uuser_id, sum( vviews.views ) AS views, sum( vviews.embeds ) AS
embeds, sum( vviews.plinks ) AS plinks, sum( vviews.`30d` ) AS 30d, sum(
vviews.`7d` ) AS 7d, sum( vviews.`24h` ) AS 24h, sum( vviews.site30d ) AS
site30d, sum( site7d
yntax of the
original poster was the braces around the select statement itself.
Drop them and it should work fine.
Now the REPLACE might be more elegantly handled with a INSERT...ON
DUPLICATE KEY UPDATE.. construct, but that wasn't the question...
On 4/17/07, Baron Schwartz <[EMAIL PROTECTED]>
i am using 5.0.22
but i found the problem. i'm an idiot. there was a space in one of my sum(x)
entries; sum (x), when i removed that, it worked fine.
thanks.
On 4/18/07, Tanner Postert <[EMAIL PROTECTED]> wrote:
5.0.22, does anyone know a workaround?
On 4/18/07, Michael Dyk
I'm having a problem with the fulltext searching, and was looking for some
help.
i'm currently working with the following query:
select table.*
from table where match(title, description) against ('*search term*' IN
BOOLEAN MODE)
the reason I am using boolean mode, is so that it matches things l
22 matches
Mail list logo