1

I'm a beginner in PHP and MySQL. Using this query information how can I add code to find duplicate people using only Phone Number and First name, middle initial and last name.

$query = "SELECT id, first_name, last_name, mi, organization, "; $query.= "primary_email, second_email, primary_phone, "; $query.= "address1, address2, city, state_province, zip, "; $query.= "last_login "; $query.= "FROM member_tbl WHERE id < 1000"; // *change to "WHERE status = 'ACTIVE'" -- but that causes a fatal memory error* $stmt = $pdo->prepare($query); $stmt->execute(); $mbrTbl = $stmt->fetchAll(PDO::FETCH_ASSOC); for($i=0; $i<$stmt->rowCount(); $i++) { *// Gather all the info for one member* $fName1 = strtolower($mbrTbl[$i]['first_name']); $lName1 = strtolower($mbrTbl[$i]['last_name']); $mName1 = strtolower($mbrTbl[$i]['mi']); $phone1 = $mbrTbl[$i]['primary_phone']; $org1 = strtolower($mbrTbl[$i]['organization']); $primEmail1 = strtolower($mbrTbl[$i]['primary_email']); $scndEmail1 = strtolower($mbrTbl[$i]['second_email']); $phone1 = $mbrTbl[$i]['primary_phone']; $address11 = strtolower($mbrTbl[$i]['address1']); $address21 = strtolower($mbrTbl[$i]['address2']); $city1 = strtolower($mbrTbl[$i]['city']); $state1 = strtolower($mbrTbl[$i]['state_province']); $zip1 = $mbrTbl[$i]['zip']; } print_r($mbrTbl); 
1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.