MySql Query For Wordpress

Hello,
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?

Thanks.

<?php
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' ) {
$do_something;
}
?>

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