Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter JonLambell

    (@jonlambell)

    I can’t believe that no one knows how to solve this problem.
    With the amount of people who frequent this place.

    I’ve found a couple of threads with similar problems, none of the solutions work but must are also unanswered threads. What’s with the lack of support with WordPress?

    Did you ever get this sorted? I’m stuck with the exact same problem and responses around here just don’t seem to be happening, so I’m guessing it’s some kind of bug that people don’t know how to fix.

    Thread Starter JonLambell

    (@jonlambell)

    Tried changing to this

    global $wpdb;
    	$tableName = $wpdb->prefix . 'tweets';
    
    	$twitterUserName = "jonlambell";
    	$tweetLimit = 5;
    
    	function tweet_install()
    	{
    		global $wpdb;
    		global $tableName;
    
    		$sql = "DROP TABLE IF EXISTS " . $tableName . ";
    				CREATE TABLE " . $tableName . " (
    				  id bigint(255) NOT NULL,
    				  name varchar(255) NOT NULL,
    				  img varchar(255) NOT NULL,
    				  msg varchar(255) NOT NULL,
    				  time varchar(255) NOT NULL,
    				  PRIMARY KEY  (id)
    				);";
    		$wpdb->query($sql);
    		$wpdb->show_errors();
    	}
    	register_activation_hook(__FILE__,'tweet_install');

    Still it doesn’t add the table to the db. I’ve tried all sorts now and it’s doing my head in. It just refuses to add the table!

    Thread Starter JonLambell

    (@jonlambell)

    No one know anything about this then? Surely I’ve either done something slightly wrong here which I can’t spot or I’m missing something.

    Thread Starter JonLambell

    (@jonlambell)

    I’ve tried putting this at the top and at the bottom of my page and it still refuses to add the table.
    I’ve also tried using ‘backticks’ around the field names to no effect.

Viewing 5 replies - 1 through 5 (of 5 total)