OK, if I am extracting a row from a mysql DB where I know that there is only ONE row:

$result = "SELECT company, fname, lname FROM table_name WHERE id = \"$id\"
";

I am should be able to use the variables right away... at least I would think so, I 
don't think I should have to run through a whileloop and create an array. But to make 
it work I had to.

while ($row = mysql_fetch_array($result)) {

$company = $row['company'];
$fname = $row['fname'];
$lname = $row['lname'];

$contact_info .= "$company $fname $lname";

So my question, shouldn't I be able to use the variables $company $fname $lname before 
the WHILE loop since I know that there is only one record?

olinux

Reply via email to