Re: ruby mysql module frage - mehrere INSERT auf einmal

Philipp Meier <[email protected]>
Newsgroups gmane.comp.lang.ruby.german
Message-ID <[email protected]>
On Wed, Aug 21, 2002 at 01:21:10AM +0200, Markus Jais wrote:
> dabei bin ich auf ein problem gestoßen:
> ich möchte mehrere datensätze auf einmal einfügen wie folgt:
> 
> sql = "INSERT INTO words VALUES('Adler', 'eagle', 'aigle', 'aquila', 
> 'aquila');"
> sql += "INSERT INTO words VALUES('Haus', 'house', 'maison', 'casa', 'casa')"
> puts sql
> m.query(sql)

Du kannst IMHO immer nur ein statement innerhalb eines "query" ausführen.
Was hindert Dich daran, mehrere Querys nacheinander abzusetzten?

-billy.

-- 
Meisterbohne       Söflinger Straße 100          Tel: +49-731-399 499-0
   eLösungen       89077 Ulm                     Fax: +49-731-399 499-9
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Y4NYfBriNoqItSYRAqRaAJ92C0icpGRGj2nB6xwjWiz9vkudZQCeLJgB
V9/1qRa1dyQshZiNnqCQc6Q=
=fC72
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.