function Fetch($result="") { if (empty($result)) {$result = $this->result;} return mysql_fetch_assoc($result); }
} ?> [/CODE]
I create two objects in my index.php file:
[CODE] <?php session_start();
include('website/includes/connection.php'); $progdb = new connection("progdb"); $coredb = new connection("coredb"); ?> [/CODE]
If I do something like:
[CODE] $query = "SELECT Count(skuID) FROM sku"; $result = $coredb->Query($query); if ($result & mysql_num_rows($result) > 0) { //CODE } [/CODE]
It works, however doing the same with the progdb (with proper tables) does not, the Query function returns false.
BUT... if I swap the order in which they are created (so $coredb before $progdb) then the opposite is true, the progdb queries work but the coredb queries fail.
What am I doing wrong? I hope I have provided enough information. I am stumped.
Closed-loop cooling and a custom 800G network protocol let the $7.3B campus run as one AI training machine.
Microsoft confirmed June 23, 2026, that its Fairwater campus in Mount Pleasant, Wisconsin, is fully operational — and the engineering behind it makes the facility something fundamentally different from every data center that came before it. Where conventional cloud infrastructure racks up general-purpose servers and parcels out workloads to each one independently, Fairwater links hundreds of thousands of NVIDIA GB200 Blackwell GPUs into a single, coherent cluster using a two-story building design, 800-gigabit-per-second Ethernet fabric, and a proprietary networking protocol co-developed with OpenAI and NVIDIA. The result, according to Microsoft, is the closest thing to a purpose-built AI supercomputer that any company has ever placed in commercial operation.
https://www.techtimes.com/articles/319205/20260627/microsoft-opens-fairwater-wisconsin-ai-campus-runs-one-supercomputer-via-800g-ethernet.htm
Last comment on this article
Decades of serving as a global manufacturing hub have allowed China to build a massive talent pool in the production sector that is almost unmatched worldwide.
Decades of using "forced labor" have allowed China.................
UN experts alarmed by reports of forced labour of Uyghur, Tibetan and other minorities across China
https://www.ohchr.org/en/press...ibetan-and-other-minorities
So why is it that the world’s largest economy, home to the most advanced technology companies and industrial powers, cannot produce a smartphone on its own soil?
ISTM it is "won't", not "cannot"
Question
firey
Okay, so I am working on a website that will use 2 database connections. The connection class looks like:
I create two objects in my index.php file:
<?php
session_start();
include('website/includes/connection.php');
$progdb = new connection("progdb");
$coredb = new connection("coredb");
?>
[/CODE]
If I do something like:
$query = "SELECT Count(skuID) FROM sku";
$result = $coredb->Query($query);
if ($result & mysql_num_rows($result) > 0)
{
//CODE
}
[/CODE]
It works, however doing the same with the progdb (with proper tables) does not, the Query function returns false.
BUT... if I swap the order in which they are created (so $coredb before $progdb) then the opposite is true, the progdb queries work but the coredb queries fail.
What am I doing wrong? I hope I have provided enough information. I am stumped.
Link to comment
https://www.neowin.net/forum/topic/1136310-php-multiple-database-connections-causing-issues/Share on other sites
3 answers to this question
Recommended Posts