Forum Moderators: coopster
here's an example of how vlookup works:
[techonthenet.com...]
I basically want to be able to 'lookup' a row based on two different fields. For example, I want to query the Product field in a table to see it contains the value of 'dictionary', if so I want to query another field in the row for Language 'french'. If both are true I want to print out that whole row - and I want it to print out all rows that have these two fields set to those particular values. Make sense? Is this possible?
Thank you!
Thanks!
<?
$query = mysql_query ( "SELECT * FROM items WHERE product='dictionary' AND language='french' " );
echo "<table border=\"1\">";
while ($get_query = mysql_fetch_row($query)){
echo "<tr>";
foreach ($get_query as $rows){
echo "<td>$rows</td>";
}
echo "</tr>";
}
echo "</table>";
?>