Hey everybody. Tryint to figure out why my row count only returns 1 instead of the actual value that it is supposed to be. Please help
$mySQL = "SELECT Pallet, puwo_number as 'Pickup Workorder', t_tag as 'T-Tag', Make, Model, serial_number as 'Serial Number' , comments as 'Comments', (Select description from dropdowns where tablename = 'pickups' and columnname = 'type' and value =pickups.type) as Type , Location, shipdate as 'Ship Date', CONCAT('<a href=http://www.fedex.com/Tracking?&cntry_code=us&clienttype=ivother&tracknumbers=' , Tracking_number,' target=new>',Tracking_number,'</a>') as 'Tracking Number', logged_by as 'Logged By', Edited_by as 'Edited By' from pickups, locations where pickups.locationid = locations.locationid";
if (trim($_POST["criteria"]) != "" && trim($_POST["choice"]) != "") {
$mySQL .= " and (" . $_POST['choice'] ." = ";
$mySQL .= " '".str_replace("\n" ,"' or ". $_POST['choice'] ."= '", trim(str_replace(", ","' or ".$_POST['choice'] ."= '", trim($_POST["criteria"]))))."')";
}
echo "MYSQL query made by variables: $mySQL <br><br>";
$result = mysql_query ($mySQL) ;
if (!$result)
{
die('Error: ' . mysql_error());
}
$count = mysql_num_rows($result);
$Output .= "Rows Returned (this using the dynamic:".$count."<br>";
[code]