Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
public function ifMailExists($user_id,$user_email) {
    $selqry = "SELECT users.*, a.contact_id as contact_id, b.contact_emails as contact_emails FROM users
                    INNER JOIN contacts a ON a.contact_id = users.user_id
                    INNER JOIN contacts b ON b.contact_email = users.user_email
                        WHERE  (user_id = '" . $user_id . "' AND user_email = '" . $user_email . "')
                        OR (user_id = '" . $user_id . "' AND user_email = '" . $user_email . "')";
        $query = $this->db->query ( $selqry );
        return $query;

    }
Posted
Comments
Member 11689465 16-Jun-15 5:08am    
suppose i want to create a chat application by clicking on chat button i want to fetch the exact id by checking the email, can anyone sugggest me?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900