Re: Max Char problem ! help! :(

From: Date: Tue, 29 Feb 2000 17:45:06 +0000
Subject: Re: Max Char problem ! help! :(
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3835@lists.php.net to get a copy of this message
Longtext. If you dont have a clue, use phpMyAdmin. Itll show you how to do this. www.phpwizard.net. ----- Original Message ----- From: "Matthew Leverton" <matthew@aeroinc.net> To: <sandeep@wde.org>; <php-general@lists.php.net> Sent: Thursday, June 29, 2000 8:42 AM Subject: Re: [PHP] Max Char problem ! help! :( > > > >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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#3835) next »