Created
September 16, 2013 21:25
-
-
Save mbahar/6586804 to your computer and use it in GitHub Desktop.
database update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setUserSchoolRole ( $user_id, $school_id, ) { | |
global $bp, $wpdb; | |
if ( $user_id && $school_id ) { | |
$sql = $wpdb->prepare( "SELECT role_id FROM tl_user_role WHERE user_id = %d AND school_id= %d ", $user_id, $school_id ); | |
return $wpdb->query( $sql ); | |
} | |
return false; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment