Re: Finding array in MySQL (I'm not asking the right question)

From: Date: Tue, 02 Dec 2003 15:42:59 +0000
Subject: Re: Finding array in MySQL (I'm not asking the right question)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171592@lists.php.net to get a copy of this message
> $arrayUser[1] = 'bob'; > $arrayUser[2] = 'cindy'; > $arrayUser[1] = 'mark'; > $countUser = count($arrayUser); > for($i = 0; $i < $countUser; $i++){ > $sql = "SELECT email FROM table WHERE id = '" . $arrayUser[$i] ."' > "; > } Is this method faster than just using IN and implode()? ie, "WHERE id IN ( '" . implode() . "' )" Chris

« previous php.general (#171592) next »