corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » MySQL Question


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author MySQL Question
MikeLamb
Member

Registered: 23rd Sep 03
Location: Crowthorne Drives: Veccy SRI
User status: Offline
13th May 05 at 17:33   View User's Profile U2U Member Reply With Quote

is it possible to forward all queries from one table to another? Ie all queries to table1 actually query table2

i know its a strange question, and theres no way i can just rename the table. The 2 tables are identical, and i have one load of scripts querying one and another load querying another


(i dont think it is possible, but would make my life much easier if possible!)
Antz
Member

Registered: 28th Jul 03
Location: Leeds         Drives: Myself Insane!
User status: Offline
13th May 05 at 17:37   View User's Profile U2U Member Reply With Quote

change the scripts to query the same table...?
MikeLamb
Member

Registered: 23rd Sep 03
Location: Crowthorne Drives: Veccy SRI
User status: Offline
13th May 05 at 17:39   View User's Profile U2U Member Reply With Quote

yeah, thats what im going to have to do, but there are literally hundreds of queries!
Antz
Member

Registered: 28th Jul 03
Location: Leeds         Drives: Myself Insane!
User status: Offline
13th May 05 at 17:40   View User's Profile U2U Member Reply With Quote

run a find and replace.... can't take more than 30 mins....

[Edited on 13-05-2005 by Antz]
MikeLamb
Member

Registered: 23rd Sep 03
Location: Crowthorne Drives: Veccy SRI
User status: Offline
13th May 05 at 17:45   View User's Profile U2U Member Reply With Quote

yup, the problem is that both tables have prefixes, each set of scripts has a different prefix. The prefix and the actual table name are only brought together in all of the mysql functions,

so a find and replace wont fix the prefix, just the actual table name
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
13th May 05 at 22:33   View Garage View User's Profile U2U Member Reply With Quote

Large duplication of data or fix the programming, I'd choose option 2.

 
New Topic

New Poll

Corsa Sport » Message Board » Off Day » MySQL Question 25 database queries in 0.0090568 seconds