SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Limes102's Avatar
    Join Date
    Sep 2006
    Location
    North Wales
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy mysql_select_db ... hangs

    Hello

    About two hours ago, this was working perfectly fine. It's been on google for ages and still can't find the answer.

    PHP Code:
        $DBHost "localhost";
        
    $DBUser "root";
        
    $DBPass "secret";
        
    $DBName "rsaan";


        
    $Conn mysql_connect($DBHost$DBUser$DBPass) or die(mysql_eror());
        
    mysql_select_db($DBName$Conn) or die(mysql_error()); 
    This doesn't work. It doesn't do anything at all, it just keeps the PHP script running. It'll work the first time I run the script, but then I have to restart WAMP to make it work again.

    If I get comment out the select db line and manually select the table name in the query, like this : "SELECT * FROM `databasename`.`tablename`" it works fine

    I have actually tried reinstalling WAMP and it still doesn't work. Oddly, even when I try it on my production server it still doesn't work.

    Am I doing something REALLY stupid?


    Ahhh
    Thanks in advanced,
    Aaron

  2. #2
    SitePoint Addict Limes102's Avatar
    Join Date
    Sep 2006
    Location
    North Wales
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    omg haha, it's just started working, left the computer for five minutes and it works! xD


    sorry everyone


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •