leequalls Posted September 7, 2010 Share Posted September 7, 2010 is it possible to SELECT $value FROM $db WHERE $field1 = $value and $field2 = $value Thanks Link to comment https://forums.phpfreaks.com/topic/212719-mysql_query-for-2-fields/ Share on other sites More sharing options...
trq Posted September 7, 2010 Share Posted September 7, 2010 Yes. Link to comment https://forums.phpfreaks.com/topic/212719-mysql_query-for-2-fields/#findComment-1108271 Share on other sites More sharing options...
leequalls Posted September 7, 2010 Author Share Posted September 7, 2010 I was hoping for the solution or will it work as typed above? Link to comment https://forums.phpfreaks.com/topic/212719-mysql_query-for-2-fields/#findComment-1108349 Share on other sites More sharing options...
PFMaBiSmAd Posted September 7, 2010 Share Posted September 7, 2010 One of the points of programming is, you can try something to see if it works the way you expect. You posted a generic query without any other information at all, so the generic answer is yes, that query could work. The query you posted would work as is, depending on what your data types are (string data values must be enclosed in single-quotes.) Link to comment https://forums.phpfreaks.com/topic/212719-mysql_query-for-2-fields/#findComment-1108356 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.