Alright, here's my problem...
I have a website that is setup using php/mysql to update things like product listings, authorized dealers, and news/press releases. Everything works.
I need to set up a similar site, which will have all the capabilities of the first but with different data. It's a new division of our company, and the demographic is different. We don't want the 2 sites sharing content.
What I've done so far:
I have the 2nd site setup, coded, etc. Everything works except the database. I copied everything over and was able to connect to the FIRST database.
I created a new database, backed up the 1st, and restored it to the new db. I did this for simplicity, so I don't need to recreate everything.
I cleared most of the content from the 2nd db, leaving only what I need for the 2nd site.
How do I connect to the 2nd db, from the 2nd site?
I can post links or code, if needed. Here's a snippet from the 1st site.
And the same section of code from the 2nd site, with minor modifications that I made in attempt to get this working.
I did create a new file in the "connections" folder. here's it's code.
and here is the old connections file:
Sorry for the huge post. Just wanna give you guys all the info I can up front.
I have a website that is setup using php/mysql to update things like product listings, authorized dealers, and news/press releases. Everything works.
I need to set up a similar site, which will have all the capabilities of the first but with different data. It's a new division of our company, and the demographic is different. We don't want the 2 sites sharing content.
What I've done so far:
I have the 2nd site setup, coded, etc. Everything works except the database. I copied everything over and was able to connect to the FIRST database.
I created a new database, backed up the 1st, and restored it to the new db. I did this for simplicity, so I don't need to recreate everything.
I cleared most of the content from the 2nd db, leaving only what I need for the 2nd site.
How do I connect to the 2nd db, from the 2nd site?
I can post links or code, if needed. Here's a snippet from the 1st site.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/ksport.asp" -->
<%
Dim rsMotorsports__varID
rsMotorsports__varID = "null"
If (request.queryString("press_id") <> "") Then
rsMotorsports__varID = request.queryString("press_id")
End If
%>
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/moben.asp" -->
<%
Dim rsMotorsports__varID
rsMotorsports__varID = "null"
If (request.queryString("press_id") <> "") Then
rsMotorsports__varID = request.queryString("press_id")
End If
%>
Code:
<% ' FileName="Connection_odbc_conn_dsn.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="true" ' Catalog="" ' Schema="" Dim MM_moben_9376_STRING MM_moben_9376_STRING = "dsn=ksport;uid=moben_9376;pwd=****;" %>
Code:
<% ' FileName="Connection_odbc_conn_dsn.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="true" ' Catalog="" ' Schema="" Dim MM_ksport_STRING MM_ksport_STRING = "dsn=ksport;uid=*******;pwd=*******;" %>
Sorry for the huge post. Just wanna give you guys all the info I can up front.


Comment