get unserialized array without using get_option()

You can use the following two inbuilt functions to do this. switch_to_blog get_option You can use both in the following way to make a function out of it which would give you the option. Put the below in the functions.php file function wpse_get_options( $blog_id = 1 ){ switch_to_blog( $blog_id ); $get_option = get_option( $option ); … Read more

Querying multiple meta_keys in WordPress SQL query

WordPress Provides a native functions to query these kind of things very easily like WP_User_Query $args = array( ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => $meta_key1, ‘value’ => $search1, ‘compare’ => ‘LIKE’ ), array( ‘key’ => $meta_key2, ‘value’ => $search2, ‘compare’ => ‘=’ ) ) ); $user_query = new WP_User_Query( $args );

Get null from POST

Please show Your html form code. Also i think you have an error in $wpdb->insert statment. Should be: $wpdb->insert(wp_ow_odczyty, array($data));

mysql update user’s password and activation key

You are using the user email as the user login. Your code, formatted for readability, looks like: $resetQuery = $wpdb -> query( $wpdb -> prepare( “UPDATE wp_users SET user_pass = %s, user_activation_key = ” WHERE user_login = %s AND user_activation_key = %s”, $hashedPwd, $useremail, $key ) ); The $useremail argument matches the user_login = %s … Read more

wpdb select from using array as search parameters

Pass your information through prepare as in this example from the Codex: $metakey = “Harriet’s Adages”; $metavalue = “WordPress’ database interface is like Sunday Morning: Easy.”; $wpdb->query( $wpdb->prepare( ” INSERT INTO $wpdb->postmeta ( post_id, meta_key, meta_value ) VALUES ( %d, %s, %s ) “, array( 10, $metakey, $metavalue ) ) ); Your array should have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)