D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] MySQL: quick graphical indication with asterisks?



Adrian Midgley wrote:

I'd like to generate a row of asterisks equivalent in length to the numeric value of a MySQL character field.

space(field) works but is no help, and I can't work out spaces+asterisk

??




CREATE TABLE a1(c varchar(20);
INSERT a1 VALUES("6");
SELECT REPEAT("*", c) FROM a1;

Cheers,

Pete


-- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.



Lynx friendly