Jump to content

[SOLVED] Search Query


limitphp

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.