Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query problem

Status
Not open for further replies.

Floodster

Technical User
Jan 28, 2005
204
Hi,
I have an SQL query which works no problem on my LOCALHOST, the problem occurs when I try running it on my live server. The error I get it;
Code:
Error

SQL-query :  

SELECT tbl_DATASET_LIBRARY.LIBHEADERID, tbl_DATASETS_HEADER.txtHeader
FROM tbl_DATASETS
INNER JOIN (

tbl_DATASETS_HEADER
INNER JOIN tbl_DATASET_LIBRARY ON tbl_DATASETS_HEADER.txtHeader_id = tbl_DATASET_LIBRARY.LIBHEADERID
) ON tbl_DATASETS.ID = tbl_DATASET_LIBRARY.LIBDATASETSID
GROUP BY tbl_DATASET_LIBRARY.LIBHEADERID, tbl_DATASETS_HEADER.txtHeader, tbl_DATASETS.txtmost_requested
HAVING (
(
(
tbl_DATASETS.txtmost_requested
) = "Y"
)
)
ORDER BY tbl_DATASET_LIBRARY.LIBHEADERID
LIMIT 0 , 30 

MySQL said: 


Unknown column 'tbl_DATASETS.txtmost_requested' in 'having clause'

Can anybody see a problem with this??
I have checked to make sure both tables have the same properties etc.
Thanks.
 
I found the problem, I was not selecting the column txtmost_requested in my query.

Sorry!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top