Re: Batch job in UNIX.
| From: | George Whiffen | Date: | Fri, 06 Jul 2001 15:24:26 +0000 |
| Subject: | Re: Batch job in UNIX. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56497@lists.php.net to get a copy of this message | ||
mysql client will read from standard input, so you can just
pipe in the sql
e.g.
echo "insert into ..... ;" | mysql -p -u root test
or from a shell script you can use "here is" syntax e.g.
mysql -p -u root test <<endmysql
insert into ....
endmysql
Johan Vikerskog (ECS) wrote:
>
> If i want to add something into a table with just the mysql command.
> Is this possible.
>
> Like
> /mysql -p -u root test "insert into..."
>
> Something like this.Is that possible and how in that case.
>
> Johan Vikerskog
> Technician - CAE Tools Support
> Research & Technology Development
>
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> Ericsson Mobile Communications AB
> Mobile Phones & Terminals Telephone: +46 46 19 33 38
> Nya Vattentornet Telefax: +46 46 19 32 36
> SE-221 83 Lund, Sweden