Log in

View Full Version : select some part of data frm db?



saikishore
02-24-2009, 09:59 AM
Hi frnds....

i have a column in database like CONTENT ..it contains 20 lines of of data....but i need to select only 5 lines of data to a single variable......


plz tell me how can i do?

boogyman
02-24-2009, 01:36 PM
"multiple lines" within a single record would be very difficult to achieve... you would first need to get the record, then split the field by some delimiter (\n or \r) if it's an actual new line.. then join the first "5" parts...

if you wanted to get "5" records where your "CONTENT" field equals/similar to something that is possible.