Gossamer Forum
Home : Products : Gossamer Links : Discussions :

SQL query format

Quote Reply
SQL query format
Hi

I have moved to a new server...

The SQL structure is up and ready...

The dump file contain the data from the old server with 10 tables of HUGE log files from the old server..

What will be the SQL quesry to import the dump file to the structure and telling the SQL monitor to ignore (and not import or return an error) the missing tables data?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] SQL query format In reply to
Not sure what you mean. Do you have CREATE TABLE statements in the MySQLDump file?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SQL query format In reply to
No

You see the old hosting server company provided me with two files structure.sql and data.sql.

In there structure file everything is fine..

But in the datafile they have data from their log tables..

So when I tried to import the data I am getting a missing table error.

I am trying to find a way to get the SQL monitor to ignore the data imprt if the table is missing..

I hope that was clear.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] SQL query format In reply to
Do the tables actually exist? If not, then you need to import the structure dump too.. something like;

mysql -uUser -pPassword database < structure.sql

and then....

mysql -uUser -pPassword database < data.sql

Hope that helps.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SQL query format In reply to
Hi Andy

Thank a lot for the help.

The structure is there, But the dump file I was given contains data from table those are not in the structure.

I am trying to find out a command that will force the SQL monitor to ignore the data if its table is not in the structure.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] SQL query format In reply to
I don't think there is a way.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [katabd] SQL query format In reply to
Hi,

For the data file, use:

mysql -f -uUSER -pPASS databaase

the -f will tell mysql to skip any errors.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] SQL query format In reply to
Interesting. I'll have to remeber that one :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!