Re: Max Char problem ! help! :(

From: Date: Thu, 29 Jun 2000 16:42:07 +0000
Subject: Re: Max Char problem ! help! :(
Groups: php.general 
Request: Send a blank email to php-general+get-3833@lists.php.net to get a copy of this message
> >1) I'm storing the comments in a mysql databse, but >apparently the max VARCHAR can only be 255 characters.. How >can I store comments which are longer? Can people suggest >anything better? > mysql has a large text data type that you could use. I forget what they call it... >2) How can I get averages of ratings? I mean I want people >to rate the album.... so I guess I can find a way of >getting them t insert a number in a ratings column.. but >how can I take an average from the numbers given a certain >movie (what i mean is that my sql query goes like this: >select * from reviews where album='$album' ) but i need it >go get average ratings too.... > This should work: SELECT AVG(rating_column) FROM reviews where album='$album' -- Matthew Leverton - matthew@aeroinc.net http://www.allegro.cc

« previous php.general (#3833) next »