Mailinglisten-Archive |
Hallo Falk,
Am Samstag, 8. April 2006 10:25 schrieb Falk Fiedler:
> Das speichern in die Tabelle über ein Formular mit PHP-Verarbeitung
> funktioniert problemlos.
> Da wird der gesamte "lange Text" in die MS SQL Tabelle geschrieben
> ....
>
> Das Auslesen realisiere ich so:
>
>
> ---schnipp---
> $output = mssql_query("SELECT * FROM $table WHERE ID =
> '$row[moduleID]'");
>
> $row_output = mssql_fetch_array($output);
>
> echo $row_output[text];
> ---schnipp---
>
>
>
> Der Text wird beim Auslesen abgeschnitten, steht also auch nicht
> vollständig im Quelltext.
>
> Abgeschnitten wird nach ca. 3800 Zeichen .... (laut WORD
> Wörterzählung)
so. Ich habe noch in die PHP-Doku geguckt. Du solltest Dir unbedingt
noch die User Contributed Notes zu mssql_query() durchlesen:
http://de.php.net/manual/de/function.mssql-query.php
Guck mal, ob folgende Hinweise dort Dein Problem lösen:
" rzachris at yahoo dot com
19-May-2005 10:25
If you're having problems trying to get data stored in a varchar column
with more than 255 chars use CONVERT to change the data type to TEXT
like this:
$query=mssql_query("SELECT table.id, CONVERT(TEXT, table.comment) AS
comment FROM table");
Don't forget to set name for the column (AS comment) or you won't be
able to retrieve the data ..."
" warwick dot barnes at aad dot gov dot au
12-Jan-2005 01:13
Using PHP 4.3.9 and MSSQL Library 7.0, when I try to SELECT text from a
column (field) defined as VARCHAR 8000 I get only the first 255
characters of the text - it's trucated for no apparent reason.
To get round this I changed the column type from VARCHAR 8000 to TEXT,
but then the output was trucated to 4096 characters.
To fix this I changed two values in PHP.INI:
mssql.textlimit = 16384
mssql.textsize = 16384
Now my text is trucated to 16384 characters, which is big enough for me
- but you can apparently use a value as large as 2147483647."
Viele Grüße
Lutz
php::bar PHP Wiki - Listenarchive