Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with MSSQLServer

Status
Not open for further replies.

aspx

Programmer
Jul 25, 2002
52
BG
Hi!
I have field in the database which should accept text (Unicode) with different size. First I set this field to be nvarchar(3000) and I've attempted to put some text (about 2000 symbols) in that field with PHP. Then I tried to view the saved text using again PHP. For my suprise the length of the text was about 100 symbols?! (I changed the type of the field to varchar(5000) but I got the same effect:(().
Again I changed the type of the field to text - but only about first 1000 symbols were saved?!
Using ntext PHP and MSSQLServer simply refused to work...

Win2kAdvancedServer/MSSQLServer2K/PHP4.2.3/Apache2.0.43
 
can u give me the SQL?

Known is handfull, Unknown is worldfull
 
form with POST-button and 3 fields...Sends the data to another page...
Code:
$headline=$_POST['headline'];
$story_text=$_POST['story_text'];
$page=$_POST['page'];
$query="Insert Into news_stories (headline, story_text, page, writer, created, modified) values ('$headline', '$story_text', $page, '$user', GetDate(), GetDate())";
$result=mssql_query($query);
If (!$result)
	{
	echo "Problem!";
	exit;
	};
....
 
did u try printing the insert query and see?
is the quyer coming correct?

Known is handfull, Unknown is worldfull
 
Meanwhile one fried of mine told the solution of the problem!!
In Php.ini default values for:
mssql.textlimit=4096 and
mssql.textsize=4096.
I changed these values to 65536 and now the size of text is OK!
Anyway, Thank you very much!!
 
Meanwhile one friend of mine told the solution of the problem!!
In Php.ini default values for:
mssql.textlimit=4096 and
mssql.textsize=4096.
I changed these values to 65536 and now the size of text is OK!
Anyway, Thank you very much!!
 
now this is news for me!!

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top