Question : return a value


does this line say
if 'no email returned'
 if(!$this->emailSearch()) {
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
if(!$this->emailSearch()) {
          $this->orderid = 0;
          return 'Not Found';
        }





  public function emailSearch() {
    $email = $this->txndata['payer_email'];
    $ordercount = dbfetch("SELECT count(orderid) FROM orders WHERE email = '$email' OR email2 = '$email'");
    if($ordercount == 1) {
      $this->orderid = dbfetch("SELECT orderid FROM orders WHERE email like '%$email%' OR email2 = '$email'");
      return true;
    }
    else {
      return false;
    }    
  }

Answer : return a value

It says if emailSearch() returns false

so basically if this query returns no results

SELECT count(orderid) FROM orders WHERE email = '$email' OR email2 = '$email'
Random Solutions  
 
programming4us programming4us