Re: [PHP-DB] Re: COUNT() returns 0 if there were no matching rows. .... really?!

2009-08-06 Thread Govinda
Here's an example (snip) from a var_dump of that $BuildPerUniqueDateArray: (note that the 'aweber_7solar_aw' table does NOT have a record for the date '2009-07-28', so I would expect to see that 1 to be a 0 there.) If a table doesn't have a record for a given date, I wouldn't expect to

[PHP-DB] Re: Count unique visits in PHP/MySQL

2004-06-10 Thread Rui Cunha
take a look at this: http://otn.oracle.com/oramag/oracle/04-mar/o24asktom.html and search for the Analytics to the Rescue example. Instead of 3 seconds you want 1800 and instead of sum you want count.Don't forget to group by ip,of course... And you're done. No need for an extra table. Hope

[PHP-DB] Re: Count unique visits in PHP/MySQL

2004-06-09 Thread Kim Steinhaug
Whatabout creating a table containing online users, where you log every activity with IP, BrowserSession and Timestamp. You also create a table to track the accual unique visits. So my logic to solve it : Update the online table like this (Some rough coding below, not tested at all, read the

[PHP-DB] Re: count

2002-04-11 Thread Ron Allen
I know how to get the results for the total number of records select count(*) from $table but how do I put them into a variable for me to use later??? David Robley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED]

[PHP-DB] Re: count

2002-04-11 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I know how to get the results for the total number of records select count(*) from $table but how do I put them into a variable for me to use later??? David Robley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP-DB] Re: count

2002-04-11 Thread Ron Allen
What is the Aliases used for??? Aliases. SELECT COUNT(*) AS howmany FROM table Then use the variable $howmany -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: count

2002-04-11 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... What is the Aliases used for??? Aliases. SELECT COUNT(*) AS howmany FROM table Then use the variable $howmany At this stage I refer you to The Fine (mysql) Manual - or anything on the SQL language. -- David Robley Temporary

[PHP-DB] Re: count from the results

2002-02-09 Thread Raymond Lilleodegard
Hi Barry! you can do it like this for example: $query = SELECT * FROM artist WHERE artist_name LIKE 'b%' ORDER BY artist ASC; $count = mysql_query(SELECT COUNT(artist) AS count FROM artist WHERE artist_name LIKE 'b%',$db); $x = mysql_fetch_array($count); $result = mysql_query($query) or

[PHP-DB] Re: Count(*)

2002-01-24 Thread Barry Rumsey
Thank you everyone. The "COUNT(*) AS c" worked great. ---Original Message--- From: Kai Voigt Date: Friday, 25 January 2002 11:11:06 a. To: Barry Rumsey Cc: [EMAIL PROTECTED] Subject: Re: Count(*)