rameshfaj Posted February 25, 2007 Share Posted February 25, 2007 Hi, I have a table which contains some variable characters. I have some string variables generated from some program.What I want is that to get the entries from the table which has the variable characters(<,>,=) to that of the program generated variable.(i.e.like string comparision).Please send me the query model. Link to comment https://forums.phpfreaks.com/topic/39985-how-to-compare-strings-in-the-table-with-other-variable/ Share on other sites More sharing options...
fenway Posted February 26, 2007 Share Posted February 26, 2007 I don't understand your question. Link to comment https://forums.phpfreaks.com/topic/39985-how-to-compare-strings-in-the-table-with-other-variable/#findComment-194446 Share on other sites More sharing options...
artacus Posted February 26, 2007 Share Posted February 26, 2007 So you have two variables right? One for the sign <,>,= and one string So in PHP you would: $query = "SELECT * FROM table WHERE field1 $sign '$str'"; So when php sends it to mysql it should look something like SELECT * FROM table WHERE field1 > 'foo' Link to comment https://forums.phpfreaks.com/topic/39985-how-to-compare-strings-in-the-table-with-other-variable/#findComment-194524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.