WordPress.org

Forums

Shortcode Exec PHP
failed to get value from database using shortcode exec PHP (1 post)

  1. nencor
    Member
    Posted 1 year ago #

    i have created the following PHP code

    <?php
    
    global $wpdb;
    
    $myrows = $myrows = $wpdb->get_results("SELECT um.meta_value FROM wp_users u, wp_usermeta um
    where u.id = um.user_id and um.meta_key='twitter' and u.user_login='soulartist'");
    
    return str_replace("@","",$myrows);
    
    ?>

    and when i hit the 'test' button, it shows messagebox with
    "[return_twitter]="""

    when i run the query on phpmyadmin, it returns a single value "@yuliusshandy"

    where did i go wrong ?

    thanks !

    https://wordpress.org/plugins/shortcode-exec-php/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shortcode Exec PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by nencor
  • This topic is not a support question
  • WordPress version: 3.8.1

Tags

No tags yet.