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 Link to comment https://forums.phpfreaks.com/topic/107728-query-trouble-please-help/ Share on other sites More sharing options...
fenway Posted May 29, 2008 Share Posted May 29, 2008 Define "not work"... no results, error, etc.? Link to comment https://forums.phpfreaks.com/topic/107728-query-trouble-please-help/#findComment-552701 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. Link to comment https://forums.phpfreaks.com/topic/107728-query-trouble-please-help/#findComment-552873 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... Link to comment https://forums.phpfreaks.com/topic/107728-query-trouble-please-help/#findComment-553570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.