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 Quote 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. Quote 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? Quote 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.) Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.