473,395 Members | 1,558 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Strore large texts in mssql and dispaying them in php

mikek12004
200 100+
I have a text field where I wish to enter a large text around 8000 words and a div where I want to diplay it.
To save I have a textarea with post I gaet the text and save it using a simple
Expand|Select|Wrap|Line Numbers
  1. insert into clroot.descriptions (desc) values ('$text')
  2.  
$test is the PHP variable holding the text.
Storing is OK but when displaying It cuts me also some chahracters I use
Expand|Select|Wrap|Line Numbers
  1. select CONVERT(TEXT,descr1) from clroot.descriptions where id='1.00930'
  2.  
to show the data but the data in the table is e.g. 6332 chars and I see only the 4086 chars
Oct 3 '08 #1
4 1564
ck9663
2,878 Expert 2GB
What's the structure of your table? Can you increase the size of your column?

-- CK
Oct 3 '08 #2
mikek12004
200 100+
id varchar(50)
desc1 varchar(8000)
desc2 varchar(8000)
desc3 varchar(8000)

in this table I want to store/display the biggest text possible what should I put to the column type? And will I have problems displaying in php?
Oct 3 '08 #3
mikek12004
200 100+
I indded have a problem displaying them in PHP, when I use
Expand|Select|Wrap|Line Numbers
  1. $ree=mssql_query("select descr1 from clroot.descriptions where id='1.00930'");
  2. echo $ree[0];
  3.  
even though the descr1 is a column with TEXT type when I do the echo I get a very trimmed version of the text.
The same result I have with
Expand|Select|Wrap|Line Numbers
  1. $ree=mssql_query("select CONVERT(TEXT,descr1) from clroot.descriptions where id='1.00930'");
Oct 3 '08 #4
code green
1,726 Expert 1GB
The same thing occurs with Access data and php.
I think it is a known php bug but check this out
manual
Oct 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
1
by: louis nguyen | last post by:
Hi All, My question is what are the best practices for administering large DBs. (My coworker is the DB administrator. I'm more of the developer. But slowly being sucked in.) My main concern...
3
by: dror | last post by:
Hello, I have a problem that actually doesn't even make sense. I have 4 million rows in my database. I want to get all records into a DataReader and then read. So if I do it in DAO (either in VB...
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
2
by: Papa.Coen | last post by:
I try to submit a large text in a textbox (22k+ chars) and all I get is a blank page. This happened after adding a few lines to a text that was 'accepted' before. Shorter (tested : 20 chars)...
2
by: bobbymusic | last post by:
Hey all, my problem is when I start to compare two texts with different lenght. The point is that the texts are loaded in two RTB and I don't know how to compare them. I found that I have to parse...
11
by: Icemokka | last post by:
Hi, I'm need to upload a big file ( 600Mb+ ) to a BLOB field in MSSQL 2005. My code looks like this : fs = New FileStream(sFilePath, FileMode.Open) Dim ByteArray(fs.Length) As Byte...
10
by: nflacco | last post by:
I'm tinkering around with a data collection system, and have come up with a very hackish way to store my data- for reference, I'm anticipating collecting at least 100 million different dataId...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.