Jump to content

bbbaldie

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bbbaldie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. :D THAT'S IT!!!!! Adding both database name and link identifier to all mysql_query() statements makes it all work!!! THANK YOU!!!
  2. I'm posting this at multiple forums, and promise to post any solution at all of them. I've been a WAMP and LAMP programmmer for nine years, so no noob. But check out this bizzare issue I've never encountered before. First of all, developing on a private intranet. I ran everything on WAMP (one physical server) for years, now have an AD-aware Linux virtual server running CentOS5. My goal is to migrate everything off of the Windows machine. I've already migrated a bunch of stuff over, still connecting to the Windows machine's MySQL. Another goal is to move all MySQL over to Linux as well, and use localhost connection statements to eliminate sending a username and password over the network. Thus, I've created a DB on the Linux side called production. I have a DB on Windows called users. Here are my connection statements: $prodconn=mysql_connect('localhost', 'myuser', 'mypass'); $users = mysql_connect('web4', 'myotheruser', 'myotherpass'); I confirm that both connections are made thusly: if($prodconn) echo "OK Prodc!"; if($users) echo " Users OK!"; and get both echos. However...This bombs: f($prodconn){ echo "Connected! "; $sq=mysql_query("SELECT * FROM production.tally")or die('CRAP! '.mysql_error()); echo "Connected!"; } with Connected! CRAP! Table 'production.tally' doesn't exist If I comment out the $users string I get Connected! Connected! However... I get other errors from $users being missing, of course. If I change the order of the connection statements: $users = mysql_connect('web4', 'myotheruser', 'myotherpass'); $prodconn=mysql_connect('localhost', 'myuser', 'mypass'); I get the same errors (from $users not functioning). In other words, both connections are successfully made, but only the final connection statement will allow me to run a table query, even with "SELECT table.tally" type statements. Sorry for the length, but I wanted all to know I've already tried a bunch of stuff, and also Googled for a similar issue, and have come up dry both times. Any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.