mysql_select_db($database_eheart, $eheart);
$query_SearchResults = sprintf("SELECT Contact.`First Name`, Contact.`Last Name`, Contact.email, Contact.Agency, Contact.Specialty, Contact.Phone, Contact.ptype, Contact.Phone2, Contact.ptype2, Contact.Address, Contact.Address2, Contact.City, Contact.Zip, Contact.Category FROM Contact WHERE 'First Name' LIKE %s AND Agency LIKE %s AND Specialty LIKE %s ORDER BY Contact.`First Name`", GetSQLValueString("%" . $varcontact_SearchResults . "%", "text"),GetSQLValueString("%" . $varagency_SearchResults . "%", "text"),GetSQLValueString("%" . $varspecialty_SearchResults . "%", "text"));
$query_limit_SearchResults = sprintf("%s LIMIT %d, %d", $query_SearchResults, $startRow_SearchResults, $maxRows_SearchResults);
$SearchResults = mysql_query($query_limit_SearchResults, $eheart) or die(mysql_error());
$row_SearchResults = mysql_fetch_assoc($SearchResults);
|