Uh, Mr Flesh:
On Tue, Jun 18, 2002 at 05:54:21PM +0100, Septic Flesh wrote:
>
> for $day=1 until $day=31
> {
> count how many records (rows) there are in the tracker table,
> without counting rows that contain the same "user_id" value,
> when the day=$day.
> }
What have you tried so far?
Did you look at the Control Structures portion of the PHP manual on
php.net yet?
Also, your approach is overly complex. Use a GROUP BY statement in your
query. Check out the MySQL (or whatever database you're using) manual for
more info the on that. In this case, write something like "GROUP BY day,
user_id"
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php