I don't know what you mean by path. I was suggesting changing your existing
"select count(*) ic from $tablename
to
"select count(*) ic from " $tablename "
Your value for
Prod in ( h:▒▒ )
needs to be quoted since you're generating your own SQL
Prod in ( 'h:▒▒' )
If that's not the expected value, print out your $comsqlquery $sqlGrpsQuery variables to see what's in them.
Rather than use literals I'd suggest using variables, if possible, for values to avoid escapement/injection issues:
<$pq1='h:▒▒'>
Prod in ( $pq1 )
Not sure what you mean by "not able to fetch records". Perhaps you've fixed the syntax errors but not logic errors. e.g. is "h:▒▒" really what you're trying to lookup or is that an artifact of an earlier mistake building the query from the RAM table?
Try setting tracesql to 4 to see exactly what you're executing and all data values.
The current situation is, I took the code from other instance where it is working fine.
The values for "Prod in ( h:▒▒ )" is coming perfectly. And logs does not show any error.
Now, the issue is, from the front-end of our application, when we try to search something, we are not getting the results and the records are indexed properly aswell in the texis database.
Here I need your advise on what could be the possible reason.
Impossible to say without knowing all about your setup.
You'll have to debug each step along the way to see what's passed and expected back to see where it breaks down.