strcasecmp not working with database value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simon2x1
    New Member
    • Dec 2008
    • 123

    strcasecmp not working with database value

    am trying to compare two variable which I select from the value from database but it does not work please help me fix this below is the code.
    Code:
     
    $result1 = @mysql_query("SELECT * FROM events");
    $data1 = @mysql_fetch_array($result1);
    $dvenue1 = $data1['ven_title'];	
    
    $result = @mysql_query("SELECT * FROM events_location");
    $data = @mysql_fetch_array($result);
    $dvenue = $data['ven_title'];	
    if(strcasecmp($dvenue1, $dvenue) == 0){
    echo 'yes';
    } else {
    echo 'no';
    }
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    it whould help to know what both variables really contain (no only what they are supposed to contain).

    Comment

    Working...