List:MySQL and .NET« Previous MessageNext Message »
From:Luke Venediger Date:October 27 2004 8:25pm
Subject:To get only the second table in a query
View as plain text  
Hi,

I'm trying to do the following:

---- Query Start ----
SELECT
  @Check := IFNULL(CheckNumber, 0)
FROM
  tb_Listing
WHERE
  CheckNumber = ?InputCheckNumber;
  
SELECT
  IF((@CheckNumber = ?InputCheckNumber), "True", "False") as IsChecked;
---- Query End ----

The problem is that when I do a MySqlDataAdapter.Fill() into a
DataTable it returns the first query as a data table, with the first
column named "@Check := IFNULL(CheckNumber, 0)". I actually only want
to return the result of the second query. If I run this query in MySQL
Control Centre with actual values it returns the result of the second
query.

Is this a bug or am I doing something wrong?

Thanks,
Luke Venediger.
-- 
Get Firefox Browser! Reclaim the web. http://getfirefox.com/
Thread
To get only the second table in a queryLuke Venediger27 Oct