I would use IN, or even BETWEEN if there exists such a function...
Jay's example is much cleaner and readable.
Jason
"Jay Blanchard" <[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',...)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php