I have found the answer
select max(greatest(f1,f2,f3 .)) from table
"Sandy" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hi
>
>
> select max(f1) as nf1 , max(f2) as nf2, max(f3) as nf3, max(f4) as nf4
> from table
>
>
Hi
select max(f1) as nf1 , max(f2) as nf2, max(f3) as nf3, max(f4) as nf4 from
table
How can I extract a max value from the 4 columns of the result ?
ex: greatest(nf1,nf2,nf3,nf4)
Thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:ht
Hi Jay
I just tried your code but I used $foo=mysql_fetch_object($result) and
returned $foo->flyCount. It works the same as your code. (I actually have
738 flies in my pot, it's a crowd, and a lot of proteins !!! ;-) ). What
method is heavier on the MySQL engine ?
count() is said to be the f
thanks
Because $result is a resource in PHP, not the actual result of the
query;
$foo = mysql_num_rows($result);
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi
Flies in pot =
function flies(){
$sql = 'select count(*) from flies';
$lnk = mysql_connect('localhost','root','123456');
$db = mysql_select_db('moar',$lnk);
$result = mysql_query($sql,$lnk);
mysql_free_result($result);
mysql_close($lnk);
return $result;
}
Why this leads to 'ressource id
Hi Shawn,
>
> I have never tried any of the NATURAL joins so your results were very
> interesting to me. The order in which the rows were joined provides you
> with some insight about how the engine actually performs the joins (which
> table is in the outer loop and which is in the inner loop). *w
LEFT, RIGHT, or CROSS join, the
So (A) INNER JOIN (C) is (B) ( A int C ).
Can you explain what are the other JOINs (CROSS, NATURAL, OUTER etc) ?
Sandy
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
tersect) RIGHT CIRCLE)
Actually LEFT JOIN depends on the left part of the predicate :
select A , C from A left join C represents A + A int C (B)
and
select C, A from C left join C represents C + C int A (B)
and
select C , A from A left join C represents A + C int A (B) but the columns
of C pr
A on 1=1
is equivalent as
select A.*, B.* from A left join B on 1=1
Sandy
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
?
Could you esplain these terms a bit to me please ?
I think these terms are the most ambigous to the beginners like me.
I read the documentation but I'm not sure I understand it very well.
Thanks
Sandy
> Here is how I prefer to write the query you wrote (using an explicit JOIN)
>
>
Hi
I have the following tables:
CREATE TABLE `livres`(
`id` int(10) unsigned NOT NULL auto_increment,
`isbn` varchar(12) NOT NULL default '',
'titre' varchar(80) NOT NULL default '',
`auteur` int(10) unsigned NOT NULL default '0',
`categorie` varchar(60) NOT NULL default '',
PRIMARY KEY (
re set as &1 and &2
Can this be done using mySQL??
Thanks for any help.
Sandy Lewis
Avant!
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (t
12 matches
Mail list logo