varghesedxb Posted July 9, 2008 Share Posted July 9, 2008 when i am running this query iam getting the following error: select trxtal.groupno as groupn,artwork.artworkno as artworkno,count(trxtal.groupno) as grp from trxtal, mstcus LEFT JOIN artwork ON (trxtal.groupno=artwork.groupno and trxtal.classcode=artwork.classcode) where trxtal.groupno=mstcus.groupno group by mstcus.groupno having sum(artwork.artworkno)>0 #1054 - Unknown column 'trxtal.groupno' in 'on clause' This query was working fine before with my old version of mysql, when i upgarde i am getting this error....pls help MYSQL version:5.0.51b Apache version :2.2.8 PHP version: 5.2.6 Link to comment https://forums.phpfreaks.com/topic/113906-mysql-error-1054-unknown-column-trxtalgroupno-in-on-clause/ Share on other sites More sharing options...
fenway Posted July 9, 2008 Share Posted July 9, 2008 Use: select trxtal.groupno as groupn,artwork.artworkno as artworkno,count(trxtal.groupno) as grp from (trxtal, mstcus) LEFT JOIN artwork ON (trxtal.groupno=artwork.groupno and trxtal.classcode=artwork.classcode) where trxtal.groupno=mstcus.groupno group by mstcus.groupno having sum(artwork.artworkno)>0 But really, don't use commas to join tables... it's very bad form. Link to comment https://forums.phpfreaks.com/topic/113906-mysql-error-1054-unknown-column-trxtalgroupno-in-on-clause/#findComment-585417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.