mOrloff
03-22-2010, 07:20 PM
I want some feedback when there aren't any matches found, and I know I've done it in the past, but I'm not getting it right now.
This is where I'm at:
while($row=sqlsrv_fetch_array($rzStock, SQLSRV_FETCH_ASSOC)){
$stockPN=$row['pn']; // grab the part number
$select='pn,description';
$from='table';
$where="pn=\"$stockPN\"";
$result=qryFunc($select,$from,$where);
}
if(!$result){
echo " - No match found for $stockPN.<br/>"; // for testing
}else{
$array=mysql_fetch_assoc($result);
echo '<pre>'; print_r($array); echo '</pre>'; // for testing
}
I never get No match found echoed, but when there is a match, I do get the array printed back successfully.
Where am I going off ?
~ Mo
This is where I'm at:
while($row=sqlsrv_fetch_array($rzStock, SQLSRV_FETCH_ASSOC)){
$stockPN=$row['pn']; // grab the part number
$select='pn,description';
$from='table';
$where="pn=\"$stockPN\"";
$result=qryFunc($select,$from,$where);
}
if(!$result){
echo " - No match found for $stockPN.<br/>"; // for testing
}else{
$array=mysql_fetch_assoc($result);
echo '<pre>'; print_r($array); echo '</pre>'; // for testing
}
I never get No match found echoed, but when there is a match, I do get the array printed back successfully.
Where am I going off ?
~ Mo