Is it possible to connect to different databases on the same
Posted: Wed Jan 14, 2004 11:28 pm
Hi All
I am designing my website and i am using php
my page gets content from one db and the nave from another, however my nav doesn't work i get the following error
Cannot redeclare class db_sql
below is the code for my nav
[Admin Edit: Added tags for clarity - please use them around PHP code so that it is easier to read.][/b]
Thanks
Armando
I am designing my website and i am using php
my page gets content from one db and the nave from another, however my nav doesn't work i get the following error
Cannot redeclare class db_sql
below is the code for my nav
[Admin Edit: Added
Code: Select all
Code: Select all
<?
include("require2.php");
$mydb2 = new DB_infolink;
$thiscatp = $_REQUEST["pageid"];
$query_list = "SELECT DISTINCT category FROM listings where page LIKE '%".$thiscatp."%'";
$mydb2->query("$query_list");
while($mydb2->next_record()) {
?>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<? printf("<td>
<img height=7 width=18 src="../assets/images/cat_dots.gif" vspace=0 hspace=0 align="MIDDLE" border=0 alt="adelaide %s"></font><a href="listings.php?cat=%s" class="menu"><font COLOR="#808080" size="-2" face="Tahoma,Verdana,Arial,Helvetica,Sans-serif,sans-serif">%s</font></a>
</td>", $mydb2->f("category"), $mydb2->f("category"), $mydb2->f("category")); ?>
</tr>
</table>
<? } ?>Armando