Wordpress plugin help

Discussion in 'PHP' started by dotcommakers, Jan 24, 2009.

  1. #1
    Hello friends

    I am learning Wodpress plugin development

    I have creating ads plugin for now.

    I have done almost everything... Now facing problem in showing data from database

    database structure is

    Wordpress > customads > adone
    
    Code (markup):
    i want to show value of adone

    here is code i am using

    function showcustomads() {
    global $wpdb;
    $table = $wpdb->prefix."customads";
         $sql = 'SELECT adone FROM $table WHERE id = 1;';
        $t = mysql_query($sql);
            if ($t==1)
        { echo $adone; }
                
                }
    PHP:
    it doing nothing!
     
    dotcommakers, Jan 24, 2009 IP