Click to See Complete Forum and Search --> : MySQL partial SELECT?


portnov
October 17th, 2006, 07:30 PM
Hello, i have small problem and wondered if anyone here knows,

Lets say i have field with array sized 100 and i want to get only the first 50 chars, can it be done on MySQL level? or i have to get entire data field and then removing the last 50 chars?

Shuja Ali
October 18th, 2006, 03:02 AM
If I understand your question properly then you can use SubString method in your select query like this Select SubString(FIELDNAME,1,50) From TABLENAME

portnov
October 18th, 2006, 06:15 AM
Thank you so much, thats what i was looking for.