Coldfusion pulling data from 2 dsn's?
few months back a friend of mine who owns a few small shops over the UK enlisted my help to clone the web based admin area of an existing store, and apply it to a new store.
Only until after i had created the clone, did i realise the database contained information relating to each individual site, eg OrderSite and ItemSite fields.
I did it the long way, i created a copy of the database, cleared all the tables contents and started from scratch.
Now its come back to bite me.
When i go to the orders section, and click on an order number it shows the order just fine...except it merges the order numbers from the two stores.
When an order is submitted (and by order i mean transaction in the store) it only goes into the cloned database, not the old one, as ive browsed it via phpmyadmin and the only orders there are the orders from the new store.
So i know that its pulling from both and merged
rather than being inserted into both, and being pulled from 1 database with all of the orders.
This is the only relevent SELECT query in the code:
Pastebinned for convenience.
I plan on making a quick fix so the admin area is usable, then working on creating it again making use of the SiteID's etc.
Ive tried modifying and deleting parts of this but it either messed it up more or just has no effect.
Ive trawled through the page and changed all the DSN's to the correct one, so i have NO idea why its still contacting the old database 😕😕
Any help would be awesome.