on 8/6/04 12:28 PM, Jay Blanchard at [EMAIL PROTECTED]
wrote:

> [snip]
> Tis SQL ....
> 
> SELECT value 
> FROM element_values
> WHERE user = $user_id
> AND(element=48
> OR element=52
> OR and so on....)
> [/snip]
> 
> You can also use IN
> 
> SELECT value
> FROM element_values
> WHERE user = $user_id
> AND element IN ('48', '52',...)


thanks Jay!

but that only seems to return the first value. how should I be calling the
results?

$query2 = "SELECT value FROM element_values WHERE "
        . "(element=48 OR element=49 OR element=50 OR element=51 OR
element=52 OR element=53) "
        . "AND user=$user_id";

$result2 = mysql_query($query2) or die("could not $query2 " .
mysql_error());
list($user_name, $address_street, $address_city, $address_state,
$address_zip, $phone) = mysql_fetch_array($result2);

do i need to do a while loop and create an array or something?

thanks again.

brian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to