Announcement

Collapse
No announcement yet.

WAY Off Topic

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

  • #3
    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

    Comment


    • #4
      Re: WAY Off Topic

      Keith, I hope you didn't consider the OS Commerce part to be one of the "Assets" you acquired :)
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


      • #5
        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

        Comment


        • #6
          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.

          Comment


          • #7
            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");
            

            Comment


            • #8
              Re: WAY Off Topic

              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.

              Comment

              Working...
              X