Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Problems with a Select query (1 reply)

$
0
0
Hi,
i have this query that is made with resultSet = statement.executeQuery(sqlCommand);

sqlCommand=select Auction.auctionid as Auction_Id,Auction.type as Category, Auction.product as Product, Product.state as State, User.ulogin as Vendor,Auction.actprice as Actual_Price, Auction.nrdays as Ends_in,Product.image as Picture,Product.productid as ProductID from auction as Auction,user as User,product as Product where Auction.userid=User.userid and Auction.productid=Product.productid order by Product.productid limit 0,40\G


like you can see almost in the end of the query iam ordering the results by Product.productid...
in the mysql command line linux client i have a correct order of all results, but using the java JDBC connector i have another order??!!they are order by User.ulogin(or User.userid)...the result i am waiting to see is ordered by Product.productid, what can i do to make the results equal(in mysql console client and in JDBC)??
I am using mysql 5.1 and JDBC mysql-connector-java-5.1.20-bin.jar and linux Mint and mysql client 5.1

thanks in advance.
regards
lmx

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>