On 1/26/08, j0hncage <[EMAIL PROTECTED]> wrote:

> $number = mysql_numrows($result);
>
>   for ($i=0; $i<$number; $i++) {
>   $bearing = mysql_result($result,$i,"bearing");
> print "<option value=\"$bearing\">$bearing</option>";
> }


Why don't you simply do a preg_match ?

for ($i=0; $i<$number; $i++) {
 $bearing = mysql_result($result,$i,"bearing");
 if(preg_match("/\w+/",$bearing)){
  print "<option value=\"$bearing\">$bearing</option>";
 }
}


As to getting the blank results into the database in the first place -
what code do you use there ?

(do you want to eliminate / stop blank results from getting into the database ?)

----
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to