Hi,
Why don't you run the CREATE TABLE query with the IF NOT EXISTS clause
then your script could look like this
CREATE TABLE IF NOT EXISTS table_name ...;
ALTER TABLE table_name;
If the table already exists only the ALTER statement will be executed,
otherwise the ALTER statement will not do any
one to the other?
Thanks,
Todd Hackathorn
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 8:30 AM
To: HACKATHORN, TODD (SWBT); [EMAIL PROTECTED]
Subject: Re: Scripting
Todd,
I'm also pretty new to MySQL and Linux but I have years of DB2
e
group and often answers questions there.
Good luck!
Rhino
- Original Message -
From: "James Marcinek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 9:32 AM
Subject: Re: Scripting
> Rhino,
>
> I know this is an off topic; how
rom: Rhino [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 04, 2004 8:30 AM
> To: HACKATHORN, TODD (SWBT); [EMAIL PROTECTED]
> Subject: Re: Scripting
>
> Todd,
>
> I'm also pretty new to MySQL and Linux but I have years of DB2 experience on
> various platforms.
>
one connection to import the data.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 3/4/04, 9:11:02 AM, "HACKATHORN," TODD "(SWBT)" <[EMAIL PROTECTED]> wr
There's a whole list of all the functions at http://www.php.net
Curtis
On Thu, 4 Mar 2004, James Marcinek wrote:
> Rhino,
>
> I know this is an off topic; however I see that you have DB2 experience.
> Most of the information I have a question you might be able to answer. Are
> you using PHP wi
abase
server? To make two connections and pull data from one to the other?
Thanks,
Todd Hackathorn
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 8:30 AM
To: HACKATHORN, TODD (SWBT); [EMAIL PROTECTED]
Subject: Re: Scripting
Todd,
I'm also
Rhino,
I know this is an off topic; however I see that you have DB2 experience.
Most of the information I have a question you might be able to answer. Are
you using PHP with MySQL? If so, have you tried to use PHP with DB2? I'd
like to know what functions you call to connect or anything that could
Todd,
I'm also pretty new to MySQL and Linux but I have years of DB2 experience on
various platforms.
I've bash scripts very useful and cron them when I have something that I
want to automate, such as a daily backup of my databases. Here are some
examples of bash scripts that I use with MySQL.
T
At 12:25 -0500 3/2/03, Stephen Tiano wrote:
Paul, Oliver--
I really, really appreciate you guys taking time from your
respective Sundays to try and enlighten me. But I'm still getting
nowhere fast.
I've gotten it to this:
I open a new shell and type:
/usr/local/bin/mysql --local-infile -u
I'm fairly new to MySQL as well (although, I do have experience with Oracle).
Even though you create a new database doesn't mean that MySQL will
automatically start using that database. After all you might want to
create 10 or 15 databases all at once (why? I don't know), then start
creating ta
Guys, Guys--
I got it! I stopped being a dimwit long enough to realize that the
change to "USE Temp;" below was for INSIDE the script.
When I made that change and again went to a new shell and typed
(actually, I dragged the file from the window in which it sat in the
Finder into the Terminal a
Hy Steve,
> USE DATABASE Temp;
try to change this into :
USE Temp;
and try it again, this should work.
HTH
Oliver
for the filter : sql,query,queries,smallint
-
Before posting, please check:
http://www.mysql.com/manual.
Paul,
Thanks very much for responding.
I tried what you suggested, but got:
ERROR 1102: Incorrect database name '/Users/stephent/Sites/Temp.sql'
I don't get this. What wrong database name? The script is supposed to
create the database and a table in it. What an I too dense to see?
Thanks a
At 8:53 -0500 3/2/03, [EMAIL PROTECTED] wrote:
I'm doing all kinds of exercises and tutorials to get up to speed on MySQL
on my PowerBook with OS X.2 running. I just tried an exercise that, for the
first time, had me creating a table not right in the MySQL monitor, but,
rather, via a script that I
Oliver,
Thanks for responding. Foolish of me to be in such a rush that I wasn't
watching what I was copying and pasting. I actually did use the command
you suggest below. And that's what drew the error message.
So I'm back to the drawing board.
Take care, and thanks again--
Steve
Hy Steve,
Hy Steve,
> bin/mysql -p http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
17 matches
Mail list logo