24/7 Support - 800.608.6482

Miva Merchant Community Forums

  1. #1
    Join Date
    Mar 2006
    Posts
    6,991

    Default WAY Off Topic

    Need to access a pinnaclecart database (mySQL) from outside (don't ask).

    This:
    Code:
    <?php
    /**
     * Testing
     */
    
    $database = 'foolme';
    
    Print "Hey there handsome";
    
    
    $con = mysql_connect("127.0.0.1","fool_user","t3st_th1s");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    echo '1) '. $con;
    echo '<br>';
    
    if (!mysql_select_db($database))
        die("Can't select  $database");
    
    
    
    mysql_close($con);
    ?>
    Gets me a connection, but the error:

    Can't select: foolme

    sure its something basic, but its always just worked for me...


    BTW: Rick, here's a great marketing idea for Miva Merchant. Give everyone a free copy of Pinnacle...has got the be the worst cart i've ever seen.

  2. #2
    Join Date
    Aug 2007
    Posts
    7,811

    Default Re: WAY Off Topic

    BTW: Rick, here's a great marketing idea for Miva Merchant. Give everyone a free copy of Pinnacle...has got the be the worst cart i've ever seen.
    Thanks Bruce
    Thanks,

    Rick Wilson
    President
    Miva Merchant
    rwilson@miva.com
    http://www.miva.com

  3. #3
    Join Date
    Mar 2006
    Location
    Greater Seattle
    Posts
    478

    Default Re: WAY Off Topic

    We just purchased the assets of a company with a CRE Loaded (OS Commerce) store. It likes to allow customers to purchase items than have been inactivated. Loads of fun, I tell ya!

    NOT!
    Keith Oratz
    PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
    www.preparesmart.com

  4. #4
    Join Date
    Mar 2006
    Posts
    6,991

    Default Re: WAY Off Topic

    Keith, I hope you didn't consider the OS Commerce part to be one of the "Assets" you acquired :)

  5. #5
    Join Date
    Mar 2006
    Location
    Greater Seattle
    Posts
    478

    Default Re: WAY Off Topic

    Absolutely not but it works (most of the time). It does have a few nice features like being able to concurrently send a message to the customer when changing order status (e.g. "sorry, it will be another week). We will be transitioning the 600+ items over to the Miva store at some point but there are many attributes, links and images to deal with.

    BTW, we purchased the assets (inventory, intellectual property, website, computers/software and customer connections/leads) but not the "business" because we didn't want to take on any unknown liabilities. They were a similar preparedness business located in Corvallis, Oregon so we've expanded our "local" reach. I've spent lots of time up and down I-5.
    Keith Oratz
    PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
    www.preparesmart.com

  6. #6
    Join Date
    Jul 2008
    Location
    NE Ohio - Go Cavs!
    Posts
    976

    Default Re: WAY Off Topic

    osCommerce 2.3.X is pretty amazing if you've got a head for PHP. We've got about half a dozen stores running on it with no more problems than we have with any other platform, which means user f-ups for the most part. For folks who can't afford annual licensing, it's a good thing. But, it isn't MIVA either, and we avoid the osCommerce forks like the plague.

  7. #7
    Join Date
    Jul 2008
    Location
    NE Ohio - Go Cavs!
    Posts
    976

    Default Re: WAY Off Topic

    Bruce - I've only seen that when the user isn't added as a database user. We use just about the same set-up as you do, so I can't see any mechanical problem.

    Code:
    $host="localhost"; // Host name or IP (maybe)
    $username="myusername"; // mySQL username
    $password="password"; // mySQL password
    $db_name="my_database"; // Database name
    $tbl_name="whichever_table"; // Table name
    
    // Connect to server and select databse.
    mysql_connect("$host", "$username", "$password")or die("cannot connect");
    mysql_select_db('my_database')or die("cannot select DB");
    

  8. #8
    Join Date
    May 2009
    Posts
    170

    Default Re: WAY Off Topic

    Quote Originally Posted by Bruce - PhosphorMedia View Post
    Need to access a pinnaclecart database (mySQL) from outside (don't ask).

    This:
    Code:
    $con = mysql_connect("127.0.0.1","fool_user","t3st_th1s");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    if (!mysql_select_db($database))
        die("Can't select  $database");
    mysql_close($con);
    ?>
    Gets me a connection, but the error:

    Can't select: foolme
    Are you sure the fool_user has permissions to access the foolme table?

    Default setups (like using phpadmin) have those match; i.e. creating user foolme makes a table named foolme, or visa versa. Either way, make sure to grant privs to fool_user so they can select from table foolme.

Posting Rules

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