You are here: Re: Return bool from query « PHP Programming Language « IT news, forums, messages
Re: Return bool from query

Posted by bobzimuta on 10/12/23 11:39

SELECT IF( CHAR_LENGTH( `text_column` ) > 0, 1, 0 ) AS fulltext_exists
FROM table WHERE .....

will return fulltext_exists as 1 if `text_column` has a length greater
than 0. Otherwise returns 0


Want to get just the first 50 characters from the fulltext as the
summary or intro?

SELECT LEFT( `text_column`, 50 ) AS summary FROM table WHERE ....

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация