Zeradin Posted September 18, 2008 Share Posted September 18, 2008 I have a field that's two lines how to i select only the second line? hopefully there's an easy way to do this. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 What do you mean there's two lines? Is there two rows, or is there a line break in the field's value? Quote Link to comment Share on other sites More sharing options...
Zeradin Posted September 18, 2008 Author Share Posted September 18, 2008 line break in the field value  it's an address so it's like 10 main st boston, ma Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Eek, I'm not sure. Maybe try searching for the '\n' line breaker and grab everything after that? Quote Link to comment Share on other sites More sharing options...
Zeradin Posted September 18, 2008 Author Share Posted September 18, 2008 how do i select everything after something in sql? or do I have to do this on the php size by exploding by \n and then taking 'array[1]? Quote Link to comment Share on other sites More sharing options...
Zeradin Posted September 18, 2008 Author Share Posted September 18, 2008 yeah the php side of it worked. just did an explode("\n", $info['location']) worked like a charm. Thanks for the hint! Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Yes, that is exactly what I meant. I'm glad it worked. 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.