SELECT id_team,
sum(IF(m.id_visitor = t.id_team,m.visitor_score,
m.home_score)) AS But_pour,
sum(IF(m.id_visitor != t.id_team,m.visitor_score,
m.home_score)) AS But_contre
FROM tab_teams t, tab_matchs m
WHERE
Hi,
I encountered a problem with a DISTINCT query (mySQL-3.23.42). I need to
order by a field not contained in the field set of the SELECT clause. The
following query works correctly:
SELECT DISTINCT
p.lastchanged AS lastchanged,
p.dam_id AS dam_id,
d.dam AS dam,
Hi,
just read about the UNION operator beging supported with mySQL 4. How far
are those operators implemented yet? Will there be any chance that UNION
ALL and INTERSECT will be supported, too?
And last but not least I want to try mySQL 4 but can't find any download
link yet. Where can I
Does anyone know how to write a query to get out the sum of a whole
table column?
SELECT sum(column) FROM table {WHERE where-clause};
Also see the manual.
:wq!
Ralph
-
Before posting, please check:
Hi,
recently I converted a table containing a large amount of text fields from
myISAM to inno-DB and encountered a problem I can't help with. The table
structure consists of:
textref_id INT(12) UNSIGNED
textref_cat_id INT(12) UNSIGNED
textgroup_key CHAR(5) NOT
the table becomes corrupted. Is this some limitation of inno DB or should I
separate the UPDATE process in two separate UPDATE statements?
It's a known and confirmed bug that will be fixed in 3.23.42. There
was an announcement just posted about this a few minutes ago.
Hi Jeremy,
thanks alot
Hi Carlos,
SELECT * FROM some_table WHERE field1 = 1 AND field2 0
ORDER BY CONCAT(field1,field2) LIMIT 1
You have to give the concatenated field an alias name and use it in the
SELECT-subpart of your query, e.g.
SELECT field1, field2, concat(field1,field2) AS sortvar1 WHERE field1=1 AND
Hi,
Does anyone know an automated way of keeping two MySQL db's (located on
different machines) in sync? A small window of non-sync could be acceptable.
Read about "replication" in the corresponding chapters in the online manual
of mySQL (http://www.mysql.com/) - Documentation.
Regards
...
Hi,
How may create a view in mysql, o make some seem to the queiries in
access !!!
As discussed already many times over and over again and as it can be read
in the mySQL documentation (http://www.mysql.com) views are (not yet)
implemented in the current 3.23.36 version.
Regards
... Ralph ...
Hi Jordan,
Well... today I can't seem to reproduce the problem anymore. :/ I was
getting it very frequently yesterday (on almost every try). I'm not sure
what has changed since then. I'll let you know if the problem happens again
and try to narrow down the exact steps to reproduce.
Is it
Hi folks,
after having carefully tuned all statements within a larger web based
application rewriting SQL statements and optimizing them by adding indices,
there are still two statements left, which are awkward concerning
performance. Maybe I am just too blind to see how to get them working
11 matches
Mail list logo