Re: Counting Words in TEXT field

From: Date: Fri, 26 Jul 2002 01:12:19 +0000
Subject: Re: Counting Words in TEXT field
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20808@lists.php.net to get a copy of this message
i'd do this in php. less work for the server to do... plain and simple. this goes back to optimizing queries... you should make the queries RETRIEVE data, not calculate, or at least minimize it. JJ Harrison wrote: > I am using mysql. > > Is it possible to count the number of words in a text column? > > Or is this a job for php(The info will be going into php anyway)? > > I can use $word = explode(' ',$row['text']); > then use count($word ). > > I just ask because mysql *may* be able to do it. > > -- Leo G. Divinagracia III ldivinag@csuhayward.edu

« previous php.db (#20808) next »