From: David Vallner Date: 2006-10-28T05:45:47+09:00 Subject: Re: ruby mysql errors -where am I going wrong here? --------------enigAD972CA7F86DC3CFEF74296A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mer Gilmartin wrote: > I know about sql injection. I just want to get a working way of taking = > in data to my db first. Since Im having problems with even that, im not= =20 > too worried about anything else. Plus this is going to be attached to=20 > the net. Its going to be on a stand alone. >=20 Fair enough. Still, try using placeholder parameters instead of string interpolation to see if that's indeed the problem? http://www.tmtm.org/en/mysql/ruby/ - under the documentation for the Mysql::Stmt class shows how. Mysql::query doesn't seem to support them. > Does anyone see anything I might be forgetting or doing wrong in the=20 > sample code. Where am i dropping the data? Am I getting the data right?= =20 > Am i doing anything else wrong? >=20 Litter some debugging output around? In particular, print @mytext at various points, and the query string to a console to see if you're trying to put anything into the DB in the first place - the problem might be in the Tk interaction code for what it's worth. (I remain blisfully ignorant on Tk by intention and GUI religious beliefs, so I can't ascertain anything about it from the code snippet.) David Vallner --------------enigAD972CA7F86DC3CFEF74296A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFQnAAy6MhrS8astoRAuIlAJ9QUoWPoSWUrPTXAutAJv4YPzf6/QCcCvvM 0ico5KDvqUuKt1yYy5MKwcQ= =PNn9 -----END PGP SIGNATURE----- --------------enigAD972CA7F86DC3CFEF74296A--