onedumbcoder Posted May 29, 2008 Share Posted May 29, 2008 i dont know why this query will not work $query = "SELECT * FROM collection WHERE SUBSTRING(word,-4,1) = SUBSTRING('" . $word . "', -4,1) "; SELECT * FROM collection WHERE SUBSTRING(word, -4,1) = SUBSTRING('Hello', -4,1) ORDER BY row Quote Link to comment Share on other sites More sharing options...
fenway Posted May 29, 2008 Share Posted May 29, 2008 Define "not work"... no results, error, etc.? Quote Link to comment Share on other sites More sharing options...
onedumbcoder Posted May 29, 2008 Author Share Posted May 29, 2008 Fenway thanks for looking into this. I am not getting any results. Can you confirm the syntax is correct? I am not sure if that query is even valid. Quote Link to comment Share on other sites More sharing options...
fenway Posted May 30, 2008 Share Posted May 30, 2008 MySQL will tell you if the syntax is correct... Quote Link to comment 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.