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.

MySQL Freindadding Script Problem

Discussion in 'MySQL' started by worldman, Dec 2, 2007.

  1. #1
    I bought a friendadding script from a member on DP a couple weeks ago. I am having problems setting up my datebase. This is what the config code looks like.

    <?
    /*$DB_USERNAME = "root"; 
    $DB_PASSWORD = "pmax";
    $DB_DATABASE = "db_maxadds";
    $DB_HOST     = "localhost";*/
    
    $DB_USERNAME = "myspac7_turbo"; 
    $DB_PASSWORD = "turbo";
    $DB_DATABASE = "myspac7_turboadds";
    $DB_HOST     = "localhost";
    $ado         = new data($DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
    
    ?>
    PHP:
    Any help? Thanks:D
     
    worldman, Dec 2, 2007 IP
  2. exipnos

    exipnos Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try this

    $link = mysql_connect($DB_HOST,$DB_USERNAME, $DB_PASSWORD) or die("Could not connect");

    $db = mysql_select_db($DB_DATABASE, $link) or die("Could not select database");
     
    exipnos, Dec 3, 2007 IP
  3. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #3
    Which line of code would I add this to?
     
    worldman, Dec 4, 2007 IP
  4. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Comment out the $ado = new xxxxxxxx; line and add the above underneath so then we can see which item is cause your problem.
     
    chopsticks, Dec 6, 2007 IP
  5. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #5
    No this is what the code looks like before I am supposed to add my database information.
    I have not tried to put in the database info yet because I am not sure which line to put it in (not good with MYSQL yet). Anyways hope that answers your questions.
     
    worldman, Dec 6, 2007 IP
  6. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Then what are the problems that you are having with the database? lol

    Help us, help you! :)
     
    chopsticks, Dec 6, 2007 IP
  7. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #7
    As I said I am just learning SQL. I would like to know where in the config file I posted should I put my database and username. Thanks.
     
    worldman, Dec 7, 2007 IP
  8. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Just replace these as such:

    $DB_USERNAME = "database username"; 
    $DB_PASSWORD = "database password";
    $DB_DATABASE = "database name";
    $DB_HOST     = "database host";
    PHP:
     
    chopsticks, Dec 7, 2007 IP
    worldman likes this.
  9. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #9
    worldman, Dec 10, 2007 IP
  10. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #10
    Looks good.


    Glad it worked out for you! :)
     
    chopsticks, Dec 10, 2007 IP
  11. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #11
    The error message is:

    Table 'sqlace.tbl_user' doesn't exist

    This means you are able to connect to the database, but the
    database does not have the table tbl_user.

    Perhaps you need to run some install script to create the table.
     
    Kuldeep1952, Dec 10, 2007 IP
  12. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #12
    Thanks kuldeep. I will change that now.
     
    worldman, Dec 11, 2007 IP