How do you add a column that increments on the fly those fields
you've selected to print in a mysql query?
Example:
select count(g.Group_ID) as Number, g.Description,
sum(i.Retail_Value) from Groups g, Item i where i.Group_ID =
g.Group_ID and i.Group_ID <> 0 group by i.Group_ID order by
i.Category_ID;
My intention was to have the Number field simple be a number that
increments by one for each line that prints out. But, of course,
the documentation says that's not what the "count" function is
for.
How can I add a simple little old line counter?
--
David S. Jackson [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I put instant coffee in a microwave and almost went
back in time. -- Steven Wright
--
David S. Jackson [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I'm not afraid of death -- I just don't want to be
there when it happens.
-- Woody Allen
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php