Re: command line question..

2001-12-05 Thread Denis A. Rudakov

Hello !

I often use that common scheme to parametrize my queries.

#!/bin/bash

#check parameters most commonly (only number of parameters)

if [ $# !=NUMBER_OF_PARAMETERS_NEEDED ];
then echo Too few parameters;exit 1;
fi

# these are queries in my transactional procedure
# $1...$N are shell positional parameters and simultaneously are parameters of
# quieries

QUERY1=SELECT ... $1$2FROM... WHERE $3 
QUERY2=INSERT  $N.
...
QUERYN=...

# now proceed queries

/usr/bin/mysql -u USER -p -B database -e $QUERY1;$QUERY2;;$QUERYN

the quotation marks after -e are required.

I hope this help.

Goodbye.
Dannis.

On Wed, Dec 05, 2001 at 09:50:47AM -0500, Gurhan Ozen wrote:
   Hello everyone..
  I know that you can write the sql scripts into a text file and redirect it
 to the mysql from command line.. Is there any way to add shell/system
 commands to automate process? PArticularly, I am looking for a way to echo
 files and put them in a blob column.
   I am also wondering if there is any way to run system commands and shell
 scripts from the mysql prompt (like we do in most Unix programs by using !

-
Before posting, please check:
   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




Re: Load ODBC Data

2001-12-05 Thread Denis A. Rudakov

Hello !

With M$ Query it's achieved just by executing any modification query
(insert,update,create etc).
Check the permissions for user from who the ODBC connections is performing.

Goodbye.
Dannis.

On Wed, Dec 05, 2001 at 04:46:22PM +0100, TOMASSONI Dominique wrote:
 Hello the list,
 
 Is it possible to import ODBC data into a mysql database ?
 
 -
 Before posting, please check:
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

-
Before posting, please check:
   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




mysqldump question

2001-11-26 Thread Denis A. Rudakov

Hi.

Suppose I have dumped all database tables using mysqldump with --tab=... option and 
I've got some *.sql and *.txt files one per table.
Ok, through the some time I want to see how changed a table living in server compared 
with it's old copy I have dumped early.
I've decided to use some of them (in shell script):
...
diff database_dump/Mtable.txt `mysqldump appropriate options
--databases MYdatabase --tables MYtable`
...
and make a conclusions depending of diff output.

But according to well known SQL standarts the order of stored records is undefined. 
However, using MySQL I note that the order of records output is the same as order of 
records input in the table and it isn't violates while queries like SELECT * FROM 
table are performed.

The question is: may I be sure I'll get absolutely identical dump result
for unchanged table with mysqldump used at different times ?

Thank you for attantion.

Goodbye.
Dannis.

-
Before posting, please check:
   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