Jaqavscript

Jaqavscript

Dear Sir,

I ahve a content coloumn i my database table.While retrieving that content to a page.same time i want to retrieve that size of the text.
In one coloumn content and in another coloumn size of the content.Mostly content are text.How to do it?What is the code?Please help

Regards
Debasis


View Answers

October 11, 2010 at 2:13 PM

Hi,

You can use MySQL length function.

Example:

select mytable.*,length(mytable.field1)as lengthoffield from mytable;

and then get the length data into your program and use it in JavaScript.

Read more at http://www.roseindia.net/sql/mysql-example/mysql-length-function.shtml

Thanks









Related Tutorials/Questions & Answers:
Jaqavscript

Ads