A Search Users In My Php PTC for admin panel

Discussion in 'PHP' started by calcalmx123, Apr 13, 2008.

  1. #1
    calcalmx123, Apr 13, 2008 IP
  2. Xtrm2Matt

    Xtrm2Matt Active Member

    Messages:
    129
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #2
    
    $lookupUsrs = mysql_query( "SELECT Account,OtherInfo FROM `table` WHERE `Account` LIKE ".$input." OR `Account`='".$input."'" );
    		
    while( $row = mysql_fetch_array( $lookupUsrs ) ) {
    	echo $row[ "Account" ];
    	echo $row[ "OtherInfo" ];
    }
    
    PHP:
    I use MSSQL rather than MySQL, but the above should work.

    EDIT: Sorry, mis-read what you said. The above will list all accounts that partially match or fully match whatever you searched.
     
    Xtrm2Matt, Apr 13, 2008 IP
    calcalmx123 likes this.