s0c0 Posted May 18, 2007 Share Posted May 18, 2007 I am looking for a query a that will allow me to select all where charecter length in a given column is greater than 5. I ahve tried the following: SELECT * FROM tbl WHERE CHAR_LENGTH(col) > 5; But mysql returns an error near CHAR_LENGTH. Any ideas? Link to comment https://forums.phpfreaks.com/topic/52059-select-where-character-length-is-greater-than/ Share on other sites More sharing options...
bubblegum.anarchy Posted May 18, 2007 Share Posted May 18, 2007 The query looks fine syntactically, maybe the tbl prefix is an issue... try again with the table name and column names wrapped in backticks: SELECT * FROM `tbl` WHERE CHAR_LENGTH(`col`) > 5; Link to comment https://forums.phpfreaks.com/topic/52059-select-where-character-length-is-greater-than/#findComment-256712 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.