You are here: Re: Question Using MSSQL_QUERY « PHP Programming Language « IT news, forums, messages
Re: Question Using MSSQL_QUERY

Posted by Chung Leong on 11/22/05 16:33

Gazchurchend wrote:
> Hi
>
> Ive been using PHP to query data from SQL Server using MSSQL_QUERY for
> a while now, but recently noticed a problem. I have a notes field in
> the database (varchar 6000) for entering text. When reading out the
> data with a simple SELECT statement I noticed it would only get 256
> characters in the MSSQL_FETCH_ARRAY result. Don't know how I missed
> this before. Obviously a significant number!
> I checked the INI file for any settings. The MSSQL.TEXTSIZE and
> MSSQL.TEXTLIMIT are both set to maximum limits, if this has anything to
> do with it.
>
> Does anyone know how to get round this problem, I have tried all the
> getting methods I know all of which do the same.

Yeah, it's a real bummer with MSSQL and PHP. What you need to do is
cast the varchar column to text in your query. So instead of

SELECT description FROM tblCrackheads

you need

SELECT CAST(description AS text) FROM tblCrackheads

 

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

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