🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8059

Re: script php

#8059
From: tete
Date: Sun, 12 Jan 2003 15:11
16 lines
2049 bytes
In article <avrr2a$iobvu$1@ID-101278.news.dfncis.de>, kurtsik wrote:
> No he enyendido muy bien lo que me has comentado. En ejemplo:
> -Yo quiero poner dentro del script que ejecute "insert into user 
> (host,user,password) values ('localhost','pepe','passwd');".
> 
> Mi duda es como se le dice que lo ejecute en la shell de mysql.
> Gracias mil.
>
Por ejemplo, ejecutar tu comando en una shell (bash) ser�a tan 
simple como esto:

$ echo "insert into user (host,user,password) \
values ('localhost','pepe','passwd');" | mysql nombre_de_la_base_de_datos

Simplemente env�a el comando a trav�s de un pipe a mysql. Esto en scripts
abre un enorme abanico de posibilidades.
Technical Details
Message-ID: <slrna40kh7.55c.tete@chitipc.chiti.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!nntp2.aus1.giganews.com!nntp.giganews.com!news-out.newsfeeds.com!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!news.uv.es!not-for-mail
References: <avrmdu$i8d5c$1@ID-101278.news.dfncis.de> <slrnb22r02.39.catactttc@paleo.chiti.org> <avrr2a$iobvu$1@ID-101278.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,741c2d5d0a89219b
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-01-12 07:18:04 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!nntp2.aus1.giganews.com!nntp.giganews.com!news-out.newsfeeds.com!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!news.uv.es!not-for-mail
From: tete@chitipc.chiti.org (tete)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: script php
Date: Sun, 12 Jan 2003 15:11:35 +0000 (UTC)
Organization: Universitat de Valencia
Lines: 16
Distribution: es
Message-ID: <slrna40kh7.55c.tete@chitipc.chiti.org>
References: <avrmdu$i8d5c$1@ID-101278.news.dfncis.de> <slrnb22r02.39.catactttc@paleo.chiti.org> <avrr2a$iobvu$1@ID-101278.news.dfncis.de>
NNTP-Posting-Host: 212-170-183-24.uc.nombres.ttd.es
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: peque.uv.es 1042384295 5387 212.170.183.24 (12 Jan 2003 15:11:35 GMT)
X-Complaints-To: newsmanager@uv.es
NNTP-Posting-Date: Sun, 12 Jan 2003 15:11:35 +0000 (UTC)
User-Agent: slrn/0.9.7.1 (Linux)