otuatail Posted October 24, 2008 Share Posted October 24, 2008 Hi not sure if this will work, but I am trying to pulll an email address from a table. because some emails are very long they mess up my table layout. I can use left(Email,14) as EmailShort to cut it down. If I could break it at the @ sign I could have the email on wrapped. is there a command that can get this Desmond. Link to comment https://forums.phpfreaks.com/topic/129941-difficult-sql-command/ Share on other sites More sharing options...
mrmitch Posted October 24, 2008 Share Posted October 24, 2008 Just add in the INSTR() function to find the index of the @ symbol on each row. left(Email,INSTR(Email,'@')) same as doing INSTR(Email,'@') as index, left(Email, index) as EmailShort Mitch Link to comment https://forums.phpfreaks.com/topic/129941-difficult-sql-command/#findComment-673707 Share on other sites More sharing options...
mrmitch Posted October 24, 2008 Share Posted October 24, 2008 You could also use LOCATE() Link to comment https://forums.phpfreaks.com/topic/129941-difficult-sql-command/#findComment-673821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.