I must of made an error in explaining hwo my product table is configured. It is in fact as you described.
Product_ name | productid
product_A | 1
product_B | 2
and so on.
Another table picks up the productid, serial number, shipping carrier, status and testing_results from those tables. Adds in construction date shipping address tracking number to make a complete record.
Now on top of attempting to create the 1,000,000 serial numbers I now am not able to view an individual record through the browser. I can from the mysql command line issue
select * from project where serial = 1
and recieve the record of serial number one. But from the browser I enter the command syntax in a submit box and it returns nothing. In the sample below is the php script for table project in datase ourdb. Pulls up all records just fine bu incapable of refining the search to just one entry.
<?php
if(!isset($query) || empty($query))
{$query = "select * from project";}
$query=stripslashes($query);
$usr = "me";
$pwd = "secret";
$db = "ourdb";
$host = "guess";
# connect to database
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); }
mysql_select_db("apiqs") or
die ("Can not Select project database");
$result = mysql_query($query)
or die ( mysql_error() );
$number_cols = mysql_num_fields($result);
echo "<b>query: $query</b>";
// table header
echo "<table border = 1>\n";
echo "<tr align=center>\n";
for ($i=0; $i<$number_cols; $i++)
{
echo "<th>" . mysql_field_name($result, $i). "</th>\n";
}
echo "</tr>\n";
//end table header
//tablebody construction
while ($row = mysql_fetch_row($result))
{
echo"<tr aligh=left>\n";
for ($i=0; $i<$number_cols; $i++)
{
echo "<td>";
if (!isset($row[$i])) //test for null value
{echo "NULL";}
else
{echo $row[$i];}
echo "</td>\n";
}
echo "</tr>";
}
// end tablebody construction
echo "</table>";
?>
// begin new submition
<?php
if (isset($submit) && $submit=="yes")
{
echo "thank you for submitting your form.";
} else {
?>
<form action="<? echo $PHP_SELF?> method="get">
<input tupe="text" name="query" size="80"><br>
<input type="submit">
</form>
<?php
// end new submission
}
?>