limitphp Posted January 15, 2009 Share Posted January 15, 2009 If I have a simple query: SELECT artist.artistID, songs.songName FROM artist, songs WHERE artist.artistName LIKE '%strokes%' AND songs.artistID = artist.artistID can I not use the songs.artistID in the WHERE part of the query unless I put it in the SELECT part? In other words, if you use a column in the WHERE part, do you have to put it in the SELECT part? thanks Link to comment https://forums.phpfreaks.com/topic/140957-solved-search-query/ Share on other sites More sharing options...
Mark Baker Posted January 15, 2009 Share Posted January 15, 2009 In other words, if you use a column in the WHERE part, do you have to put it in the SELECT part? Simple answer, Nope, it isn't necessary to select it Link to comment https://forums.phpfreaks.com/topic/140957-solved-search-query/#findComment-737785 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.