Q: Returning data from or sql statement Am retrieving data from a database using json 
CODE:
The values of ($id_from= 1 and  $id_to= 4)

The sql statement is
$sql ="SELECT * FROM {$this->_table} WHERE comm ='$idfrom$idto' or comm ='$idto$idfrom'  ";  

This returns no results
But when i do :
$sql ="SELECT * FROM {$this->_table} WHERE comm =14 or comm =41  ";

It returns all results
My database
 
Where could i be making a mistake in the first sql statement

A: If the comm column is of INTEGER type use the following sql query:
$sql = "SELECT * FROM {$this->_table} WHERE comm IN ($idfrom$idto, $idto$idfrom);";

