SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: $this->Open ??

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $this->Open ??

    ARGH.. this is killin me

    $this->Open ("localhost", "username", "password")
    or die ("line 42");

    Im getting the dead line.. is there soemthing wrong with my syntax?

  2. #2
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try:

    mysql_connect("localhost", "username", "password") or die("line 142");

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nah..thats not workin

    damn
    thanx anyways

  4. #4
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you got the correct host, username and password?

  5. #5
    SitePoint Zealot Alarion's Avatar
    Join Date
    May 2001
    Location
    Virginia
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what the heck is $this->Open() ??

    is it a function inside an object YOU defined?

    $this is usually only used within a class implementation so that it can call it's own functions and access its own variables.

    we need a little more info on what you are doing.

    it does look like you have a space between the Open and the () though. dunno if that affects it...
    -=Alarion=-
    Protollix - Linux hosting from $3.95/m

  6. #6
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Youcan only reference a class with $this-> when you're calling it from within that class. You don't appear to be doing that so you need to reference it by whatever you initalised it as in your script.


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
  •