faiz binghiz Posted July 12, 2011 Share Posted July 12, 2011 hi guys can anyone help with this code please ? $query_product = sprintf("SELECT * FROM company WHERE product1 = %s", GetSQLValueString($colname_product, "text")); i worte thise code to compare the variable product1 to a database columne, but now i need to compare the same variable product1 with other valuse in same table. in other worde : product1 = value1 OR value2 OR value3 OR value4 OR value5 OR value6 i hope i made it clear. thank you. Quote Link to comment https://forums.phpfreaks.com/topic/241759-urgent-help-needed-please/ Share on other sites More sharing options...
trq Posted July 12, 2011 Share Posted July 12, 2011 And you are stuck where? Quote Link to comment https://forums.phpfreaks.com/topic/241759-urgent-help-needed-please/#findComment-1241662 Share on other sites More sharing options...
faiz binghiz Posted July 12, 2011 Author Share Posted July 12, 2011 im stuck with adding the other values that i wana compare the var product1 to. currtenly i have "WHERE product1 = %s" %s represnts the one filed in the database. i wana compare the same var product1 to other variables. so im stuck in adding the variable that represnts the other database fields, lets say value2, value3, value4 and so on thanx Quote Link to comment https://forums.phpfreaks.com/topic/241759-urgent-help-needed-please/#findComment-1241666 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.