• i’ve tried to install a whoisonline plugin and filled out the required fields in my mysql administratione tool as described in the ‘read me’file from the plugin.

    Now ived created a table but i in the read me file it says PRIMARY KEY (wo_id) i cannot seem to figure out where i should fill this out exactly, and what i should fill out. MYSQL keeps returning the message with a message about auto something and primary key..

    anyone know what i’m talking about??

Viewing 8 replies - 1 through 8 (of 8 total)
  • Might help if you gave a link to the plugin you’re using – then maybe someone who’s familiar with it will be able to help.

    Thread Starter linusdepinus

    (@linusdepinus)

    Well no link cause i can’t get it to run at all.. But beneath is the read me file. I want to ‘add to the database’ as is explaind. The line ‘primary key’ has me puzzled. Don’t know how and where 2 fill it out exactly

    Plugin Information:
    Plugin name: Who Is Online script…
    Plugin URI: https://www.mcmike.nl/english
    Author: Michiel ‘McMike’ Auerbach
    Version: 3.5

    IMPORTANT INFORMATION:
    This script uses the COOKIE information stored by WordPress since I could not locate the standard user-name / author name
    If you have this information please contact me ??
    So sometimes the cookie-information is WRONG since I only use a simple hack to get thru this. I will work on a better output
    offcourse. But I reckon its right 80 – 90% of the time ?? ??

    VERSION INFORMATION:
    V1.0 21/03/2005 – McMike – Started and finished the first version
    V2.0 21/03/2005 – McMike – Started and finished the second version, this version runs on the sql-database that WordPress uses also.
    V2.5 22/03/2005 – McMike – Upgraded the 2nd version the COOKIE problem is solved ?? ?? ??
    V3.0 28/03/2005 – McMike – Upgraded small non-functional features
    V3.1 08/04/2005 – McMike – Fixed a HUGE bug wich completly f*cked up the plugin !!
    V3.5 08/04/2005 – McMike – New function wo_lastvisit() – Shows the last visit of a person

    Upgrade installation:
    V3.1 to V3.5
    Simply overwrite the old wieonline.php file

    Installation information:
    Download the plugin
    Unzip the plugin into you wp-content/plugin

    Add to the database where wp also running in:

    –START MYSQL QUERY–
    CREATE TABLE wieonline (
    wo_id int(11) NOT NULL auto_increment,
    wie varchar(255) NOT NULL default ”,
    tijd int(11) NOT NULL default ‘0’,
    ip varchar(255) NOT NULL default ”,
    cookie text NOT NULL,
    PRIMARY KEY (wo_id)
    ) TYPE=MyISAM AUTO_INCREMENT=0 ;
    –END OF MYSQL–

    Put somewhere in your script (where you want to view the last visitors:
    <?php wieisonline(); ?>

    ## NEW FUNCTION SINCE V3.5 ##
    <?php wo_lastvisit(); ?>
    This function shows a simple line of information:
    “Welcome back McMike, your last visit was on 08-04-2005 08:01:41”
    You can alter this at line 21 of the wieonline.php

    I you have any questions please mail me: [email protected] ??

    Have fun ??

    The intention of the plugin author was for you to run the create table SQL as is, i.e. run the query:
    CREATE TABLE wieonline (
    wo_id int(11) NOT NULL auto_increment,
    wie varchar(255) NOT NULL default '',
    tijd int(11) NOT NULL default '0',
    ip varchar(255) NOT NULL default '',
    cookie text NOT NULL,
    PRIMARY KEY (wo_id)
    ) TYPE=MyISAM AUTO_INCREMENT=0 ;

    This will specify wo_id as the primary key so you don’t need to do anything else.

    Thread Starter linusdepinus

    (@linusdepinus)

    am sorry but i filled out the above and i get this :

    MySQL retourneerde:

    #1075 – Incorrect table definition; There can only be one auto column and it must be defined as a key

    I”m doing something wrong but don’t know what!?

    I just tested it (not that I am using the plugin:) and it works. Here is what I did:
    1. Opened my phpMyadmin
    2. Selected (on the left) the database where my blog is
    3. On the top clicked on the SQL tab
    4. Pasted the code above from ifelse’s post in the query window
    5. Clicked GO

    Thread Starter linusdepinus

    (@linusdepinus)

    WHOWHOOO thanks moshu this was the info i was waiting for!! i was thinking way to complicated

    ??
    so, from now on you know that “running a query” in the DB has to be done with these steps, LOL

    Thread Starter linusdepinus

    (@linusdepinus)

    Oh, moshu i’ve learned so much in the past few days:)
    still a long way 2 go since i have problems with the most simple things as outlining and stuff.. but this forum is a really great help!!! (big smile)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘primary key’ is closed to new replies.