9 messages in com.mysql.lists.javaRE: Prepared statement question
FromSent OnAttachments
Twibell, Cory L02 Jun 2003 16:35 
Twibell, Cory L03 Jun 2003 09:58 
Mark Matthews03 Jun 2003 10:28 
Dane Foster03 Jun 2003 15:12 
Twibell, Cory L03 Jun 2003 15:48 
Dane Foster03 Jun 2003 19:03 
Bruno Pereira04 Jun 2003 02:50 
Frank Gates04 Jun 2003 04:08 
dr.ahab04 Jun 2003 04:40 
Subject:RE: Prepared statement question
From:Twibell, Cory L (cory@lmco.com)
Date:06/03/2003 03:48:33 PM
List:com.mysql.lists.java

Dane,

I tried the regular statement and it worked like it should have. I want my SQL statement as a prepared statement though, because it will be executed multiple times.

Have you tried executing the query using a regular Statement object? If so, did it work?

----- Original Message ----- From: "Twibell, Cory L" <cory@lmco.com> To: <ja@lists.mysql.com> Sent: Tuesday, June 03, 2003 12:58 Subject: RE: Prepared statement question

Steve,

That did work, although I would have thought that the FROM clause would "automatically" do that for you.

Thanks!

-----Original Message----- From: Steve Forsyth [mailto:stev@hotmail.com] Sent: Tuesday, June 03, 2003 2:47 PM To: cory@lmco.com Subject: RE: Prepared statement question

I'm not saying that this isn't a bug BUT, have you tried qualifying * with table1.* in the select?

----- Original Message ----- From: "Twibell, Cory L" <cory@lmco.com> To: <ja@lists.mysql.com> Sent: Tuesday, June 03, 2003 12:58 Subject: RE: Prepared statement question

Hello all,

Using MySQL4.1.0-alpha and Connect/J 3.1.0 (nightly 20030530) for Sun8.

My question is this, I have a prepared statement like so: Select * from TABLE1 where ID = (select MAX(ID) from TABLE2); This gives me back all columns from Table1 and Table2 and not just the columns from Table1 in my resultset. When I execute the same statement from the MySQL command line, it gives the correct response.

Thanks.