MySql Query For Wordpress

I want to edit a Wordpress plugin. My code is below. The parts in which I’m stuck is documented in the code. Could you show me the correct way to write the code please?


global $wpdb; //I think this is correct

//I need help to convert the 2 lines below to a Wordpress friendly query
$query1="SELECT * FROM wp_users WHERE user_login LIKE '%z%'"; 
$result1 = mysql_query($query1);

//I want to put the search results into the example below
if ( $user_login == 'admin' || $user_login == 'joe' ) {

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.