If there are less than one row, you won't be able to pull any information from it.
From what I can see, You are saying to MySQL:
"Give me the info from All of these Tables for This Drivers ID:" (12 Lets say)
Then MySQL Replies
"There is no driver 12" (There are 0 Rows)
And you are trying to display a first name and last name FROM the database.
My SQL Skills are only so/so, but Can't you get the firstname AND lastname (only) from the database that holds it as new COlums
i.e. SELECT drivers.driver_fname As DriverFname, drivers.driver_lname As DriverLName... (continue on)...
Else, Less effiantly, you can run a 2nd query to grab the drivers names alone.
[edit]
The only other thing is of course, if it was able to find the first & last name, then the result would be 1 (those two columns).
Something like:
<?php
// Connect
require_once ("/config.inc");
$display_block = "<h1>Nascar Drivers - Product Detail</h1>";
//get items
$get_product_sql = "SELECT product.driver_num, product.product_name, product.product_num, product.product_price, product.product_desc, product.product_pic_thumb, drivers.driver_fname, drivers.driver_lname FROM product LEFT JOIN drivers ON drivers.driver_num = product.driver_num WHERE product.driver_num = '".$_GET["driver_id"]."' ORDER BY product.product_name";
$get_product_res = mysql_query($get_product_sql, $db_connection) or die(mysql_error());
if (mysql_num_rows($get_product_res) <1) {
$display_block = "<h2>Sorry, no categories to browse for the Driver ";
mysql_free_result($get_product_res);
$query = "SELECT driver_fname, driver_lname from drivers WHERE driver_num = '".$_GET['driver_id']."' LIMIT 0,1";
$result = mssql_query($query, $db_connection) or die (mysql_error());
if ($result && mysql_num_rows($result) > 0) {
$names = mysql_fetch_array($result);
$display_block.=$names[0]." ".$names[1];
} else {
$display_block.="ID# "$_GET['driver_id'];
}
mysql_free_result($result);
$display_block .="</h2><p>Please <a style=\"text-decoration: none\" href=\"seestore.php\">continue to shop</a>!</p>";
} else {
while ($product = mysql_fetch_array($get_product_res)) {
$product_drive_id = $product['driver_num'];
$product_id = $product['product_num'];
$product_name = stripslashes($product['product_name']);
$product_price = $product['product_price'];
$product_desc = $product['product_desc'];
$product_pic = $product['product_pic_thumb'];
$display_block .="<table><tr>";
$display_block .="<td valign=\"middle\" align=\"center\" width=\"25%\">
<a style=\"text-decoration: none\" href=\"showitem.php?product_id=".$product_id."\">
<img src=\"".$product_pic."\"/>
</a></td>";
$display_block .="<td valign=\"middle\"><p><br />
<a style=\"text-decoration: none\"href=\"showitem.php?product_id=".$product_id."\">".$product_name."
</a></strong>(\$".$product_price.")<br />".$product_desc."</p><br /></td>";
}
$display_block .="</tr></table>";
}
//free results
mysql_free_result($get_product_res);
echo $display_block;
?>