query($sqlsearch); $totalsearch = mysql_num_rows($resultsearch); $rssearch = $db->query($sqlsearch); while($rowsearch = $db->fetch_array($rssearch)) { $searchresulttext = $rowsearch["searhcatname"]; $sql_productphoto = "SELECT * FROM attachment WHERE table_name='products' and table_id ='".$rowsearch["id"]."'"; $rs_productphoto = $db->query($sql_productphoto); $productphoto_list = ""; while ( $row_productphoto = $db->fetch_array($rs_productphoto)){ $photo1 = $row_productphoto["file_name"]; $photopath1 = $row_productphoto["path"]; if ( $row_productphoto["col_name"]=='Photo Small Left' ){ $photoleft = $row_productphoto["file_name"]; $photopathleft = $row_productphoto["path"]; } if ( $row_productphoto["col_name"]=='Photo Small Middle' ){ $photomiddle = $row_productphoto["file_name"]; $photopathmiddle = $row_productphoto["path"]; } if ( $row_productphoto["col_name"]=='Photo Small Right' ){ $photoright = $row_productphoto["file_name"]; $photopathright = $row_productphoto["path"]; } } $templist .= '
'.$rowsearch["{$_SESSION['lang']}_brief"].'
'.$row["{$_SESSION['lang']}brief"].'