Dynamic ORing

2007-07-10 Thread Dave G
Hello all, I'm trying to do some processing on the front end to optimize my query on the backend. I would like to generate a list of id's for this query like so: SELECT REPLACE('3,4,5,6,7,8,9',',',' OR element_id=') INTO @tmp; Then use it like: mysql select @tmp;

Re: Dynamic ORing

2007-07-10 Thread Baron Schwartz
Hi Dave, Dave G wrote: Hello all, I'm trying to do some processing on the front end to optimize my query on the backend. I would like to generate a list of id's for this query like so: SELECT REPLACE('3,4,5,6,7,8,9',',',' OR element_id=') INTO @tmp; Then use it like: mysql select @tmp;

Re: Dynamic ORing

2007-07-10 Thread Dave G
Thank you Baron, I'll give that a shot, and thanks for the IN() list tip ... much appreciated. Dave Hi Dave, Dave G wrote: Hello all, I'm trying to do some processing on the front end to optimize my query on the backend. I would like to generate a list of id's for this query like so:

Re: Dynamic ORing

2007-07-10 Thread Dave G
Prepared Statements with the IN function worked beautifully. Performance is slightly degraded, but I get the functionality I want and can live with the slight performance hit. Thanks again. Dave Hi Dave, Dave G wrote: Hello all, I'm trying to do some processing on the front end to