$sql = "SELECT fielda, fieldb FROM mytable";
$result = mysql_query($sql);
At this point, $result holds a pointer to your results; you need to fetch the rows returned by the query.
You have lots of choices
while ($row = mysql_fetch_row($result)) {
$vara = $row[0];
$varb = $row[1];
//process the data
}
while (list($vara, $varb) = mysql_fetch_row($result)) {
//process the data
}
while ($row = mysql_fetch_array($result)) {
$vara = $row['fielda'];
$varb = $row['fieldb'];
//process the data
}
Theres also [man]mysql_fetch_assoc/man and [man]mysql_fetch_object/man
hth