Jump to content


Photo

How can you grab a certain ammount of characters from a table?


  • Please log in to reply
2 replies to this topic

#1 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 21 September 2006 - 11:58 PM

Like a portal it grabs a certain ammount of text from database.

#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 22 September 2006 - 04:14 AM

Assuming you are using mysql:

SELECT SUBSTRING(column FROM 1 FOR 50) FROM table

That'll select the first 50 characters from column in table.

#3 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 22 September 2006 - 10:46 AM

Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users