proctk Posted July 23, 2007 Share Posted July 23, 2007 my is there a way to explode a cell value within a mysql statement for example ("SELECT * FROM image_files WHERE details = 'Explode("-",details')Return array[2]'") hope that kinda makes sense. I want to explode the value in column details at the "-" and get the third value sent in the array as it would if using the php explode feature. any help is excellent Link to comment https://forums.phpfreaks.com/topic/61304-explode-mysql-cell-value/ Share on other sites More sharing options...
cooldude832 Posted July 23, 2007 Share Posted July 23, 2007 just use list or set it as a variable outside and use the value in the query Link to comment https://forums.phpfreaks.com/topic/61304-explode-mysql-cell-value/#findComment-305027 Share on other sites More sharing options...
proctk Posted July 23, 2007 Author Share Posted July 23, 2007 I'm trying avoid that as I would have to use a while statement which is creating me problems see this post for details http://www.phpfreaks.com/forums/index.php/topic,151005.msg651566.html#msg651566 Link to comment https://forums.phpfreaks.com/topic/61304-explode-mysql-cell-value/#findComment-305028 Share on other sites More sharing options...
cooldude832 Posted July 23, 2007 Share Posted July 23, 2007 too much code to read for, but you shouldn't have a query in a while loop, instead write the query as a while loop and query once. show me the line(s) you talking about Link to comment https://forums.phpfreaks.com/topic/61304-explode-mysql-cell-value/#findComment-305029 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.