jmaccs64 Posted September 18, 2006 Share Posted September 18, 2006 What would cause this from a cmd line mySQL query?Here is the query...[code]SELECT * FROM surpool06 WHERE surpool_week='2' ORDER BY surpool_team, surpool_username[/code]In phpmysql there appears to be line breaks in some fields before it lists surpool_team?And those are the fields that are messed up.... What could be causing this?Thanks[code]+------------+-----------------------+--------------+--------------+| surpool_id | surpool_username | surpool_team | surpool_week |+------------+-----------------------+--------------+--------------+| 172 | big daddy d | Bears | 2 || 262 | dancsu17 | Bengals | 2 || 170 | big daddy d | Chargers | 2 || 168 | big daddy d | Colts | 2 || 169 | big daddy d | Colts | 2 | | 2 | | | 2 | | | 2 | | | 2 | | | 2 |leman | | 2 |ime | | 2 |irter | | 2 |npa24 | | 2 |Tate for Heisman | | 2 |tt81 | | 2 |os | | 2 |r911 | | 2 |an | | 2 | | | 2 |lo | | 2 |rtime | | 2 |rtime | | 2 |g1429 | | 2 |a64 | [/code] Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/ Share on other sites More sharing options...
Daniel0 Posted September 18, 2006 Share Posted September 18, 2006 Is the problem that the output looks wierd when you run the query from the CLI? Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/#findComment-93827 Share on other sites More sharing options...
jmaccs64 Posted September 18, 2006 Author Share Posted September 18, 2006 Yes....And there are line breaks in the fields in phpmysql.I think i have figured out why the form that was inserting data may have had a break in it....but now i would like to remove all line breaks from the database is that possible, and if so how? Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/#findComment-94005 Share on other sites More sharing options...
fenway Posted September 18, 2006 Share Posted September 18, 2006 Shouldn't be to difficult to issue a REPLACE() and to strip CR/LFs. Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/#findComment-94077 Share on other sites More sharing options...
jmaccs64 Posted September 19, 2006 Author Share Posted September 19, 2006 I am so new at this..... I would not even know where to start?Would I replace "/n" with ""???Thanks Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/#findComment-94375 Share on other sites More sharing options...
jmaccs64 Posted September 19, 2006 Author Share Posted September 19, 2006 I figured it out here is what I did![code]UPDATE `myTable` SET myField = replace(myField,"\r","") ;[/code] Quote Link to comment https://forums.phpfreaks.com/topic/21119-cmd-line-mysql-query/#findComment-94665 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.