Jump to content


Photo

PHP / MSSQL / ODBC Limits


  • Please log in to reply
2 replies to this topic

#1 bholbrook

bholbrook
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 15 September 2006 - 06:08 PM

I have a string stored in a DB that is very long. When I print it out on the page, it chops off at 4,096 characters.

Is tis a MSSQL limitation, ODBC limitation or PHP string limitation?

WIN 2003 Server
MSSQL DB
ODBC Connection through PHP

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 15 September 2006 - 06:31 PM

WIN 2003 Server
MSSQL DB
ODBC Connection through PHP

mssql sort of sucks.  Mysql would be your best bet, but if it's a huge chunk of text, use longtext type.  If it still cut's some off, then if it's temporary store it in a session, if not then you can always store an infinite amount in a file somewhere.  even if it's temporary.  But there is a huge limitation on mysql, with data type long text.  It isn't a php, or connection limitation.  You could have 50 different full length novels saved in 1 php variable.  The database however may have an upper limit, even with longtext, but a file is not limited, you can always add more to it, it just increases the bytes, taking longer to load

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 bholbrook

bholbrook
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 15 September 2006 - 08:45 PM

Unfortunately we have no control over what database is being used, and I don't believe it is a database issue; the database field is holding the appropriate text.

I didn't think that strings had limits, and if ODBC doesn't limit it, what couold be the problem?

Does ODBC or MSSQL send the information in 4096 bit chunks and it has to be read that way?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users