Forum Moderators: open
Here is the query. Would this have any adverse effects?
$result2 = mysql_query("SELECT * FROM ".$tableprefix."dbname_categories WHERE (catid = '$catid' OR optcatid = '$catid') AND parentcatid = '$parentcatid' ORDER BY displayorder ASC");
It is the (catid = '$catid' OR optcatid = '$catid') that I'm concerned about, of course.
performance wise, it's about as good as you can get it. If you don't need all the columns returned, you can swap out the "Select *" for "Select column1, column2....". Not sure how much of a performance gain that will get you if the table and rows are small.
Chip-