[PHP-DB] Re: Combining 2 queries into 1?

2004-05-31 Thread Alexey Kupershtokh
Kim Steinhaug [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] After crawling through the MySql reference I finally found the function I was looking for, the sollution for combining theese two queries would be : SELECT count( * ) AS online_anonymous, sum( sign( uid ) ) AS

[PHP-DB] Re: Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
And ofcourse, one part I didnt take into the equation, one complex query doesnt always execute faster than two fast queries. So I might as well be sure that the environment is optimized for the two queries im already having... I still however would like to know if its possible to join the two

[PHP-DB] Re: Combining 2 queries into 1?

2004-05-30 Thread Kim Steinhaug
After crawling through the MySql reference I finally found the function I was looking for, the sollution for combining theese two queries would be : SELECT count( * ) AS online_anonymous, sum( sign( uid ) ) AS online_members FROM `database` I also benchmarked this and the performance went