1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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; }
    it doing nothing!
    dotcommakers, Jan 24, 2009 IP