Topic: is this optimization?

There are a few queries e.g in moderate.php, that do something like this:

'SELECT 1 FROM topics WHERE id IN ('.implode(',', $topics).')'

And then you compare the num_rows of the result to the count of the array $topics.

I don't know if this is really optimization, so - would it be faster to do a query like this?

'SELECT COUNT(id) FROM topics WHERE id IN ('.implode(',', $topics).')'

Thanks

FluxBB - v1.4.8

Re: is this optimization?

Yes, that likely would be, I'll make the changes

Re: is this optimization?

cool. thx

FluxBB - v1.4.8